A WordPress developers guide / tutorial – for adding custom menu in new wordpress theme, add one or multiple new theme locations for the custom WordPress menus, so that menu can appear in those places. Register new menu items. Enable your new wordpress theme to add custom user defined nav menus from the admin dashboard. Continue reading “Add custom menu, Add theme locations & register new menu”
Password protecting WordPress Page or Post : in which you need to enter password every time.
The Problem is : I have set a password for a page/post in my wordpress blog. I need to ensure that the information should be protected by a password. Normally if you enter a password its kept by the browser cookies. So you don’t need to re-enter passwords. But if I don’t want that. Then what- if I need to re-enter password for each visit..???? Continue reading “Password protecting WordPress Page / Post in which you need to enter password every time”
I have found the following WordPress tutorials very useful for the beginners to write a plugin in WordPress. Here few plugins tutorial has been listed below. You will be able to build simple contact forms in WordPress after reading one, another tutorial will guide you to change the administration section and login page logo etc. Just go through them and enjoy… Continue reading “How to create wordpress plugins: tutorials”
Probably this problem don’t arise in Windows system, but arises in Linux, and I have faced this problem in Ubuntu 12.04.4 LTS. I tried to install demo-data-creator.zip plugin located in my Home folder. I opened the WordPress Dashboard in browser. Gone to-
Admin section -> Plugins -> Add New -> Upload, then click CHOOSE FILE button, click INSTALL NOW.
WordPress Plugin installation in Ubuntu asking for FTP connection info:
When I am trying to install a plugin in WordPress , it is asking for FTP connection information like the following
A solution has been described in this page.
To install WordPress, to update WP themes in ubuntu, to install or update plugins (WP), to install new WP themes in the WEBROOT of local web servers like Apache, you may have faced the following type of problems. Normally web server folder in local Ubuntu installations are located in /var/www/html . Continue reading “WebRoot access permission, Cannot write in /www/var/html”
PHP Tutorial- Chapter 1 (PHP Syntax)
How to use HEREDOC in PHP with examples, also use easy to use examples in PHP for declaring variables, constants. Also know which tags you can use in PHP script to write PHP code in it. Continue reading “PHP Syntax- heredoc, string, variables and constants, logical operators”
Upload files using PHP explained here in this example. Continue reading “Upload files using PHP explained”
The steps to connect MySQL database with PHP with simple PHP code example.
- Connect the server
- Select the DB
- Write theSQL query
- Execute the query & get the resultset / query output in a variable $result.
- If resultset contains greater than 1 record the process each record of the recordset by a while loop
$MYSQL_HOST = “localhost”;
$MYSQL_USER = “bikram”;
$MYSQL_PASS = “bikram”;
$MYSQL_DB_NAME = “eworkshop”;
// connect the server
$server = mysql_connect($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASS) or die(“MySQL server connection error : “.mysql_error());
echo “server connected<br />”;
//connect the DB
mysql_select_db( $MYSQL_DB_NAME , $server) or die(“”.mysql_error());
echo “db connected<br />”;
// execute query
$query = “select vehicle_name from vehicle_table“;
$result = mysql_query($query) or die( mysql_error());
if(mysql_num_rows($result) > 0)
echo “<table><tr><th>vehicle name</th></tr>”;
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
Static in PHP:
Retains the local variable value and it donot loose its value at the end of function call.
echo $x.”<br />”;
Output of this program: