Create WordPress Custom Post Meta
Create WordPress Custom Post Meta
Theres Light At The End Of Every Tunnel, Keep Moving
Create WordPress Custom Post Meta
In this example ‘my-theme-textdomain’ is the defined as textdomain for the Theme. Text Domain is used to make the Theme translatable. (Codex reference: load_theme_textdomain()). Define the Theme’s textdomain load_theme_textdomain( ‘my-theme-textdomain’, TEMPLATEPATH.’/languages’ ); Define translatable strings in the template. This is done using one of a few translation functions: __() (for returned strings), _e() (for echoed …
Use number_format() function to format number to decimal places. [php] [/php]
Following SQL statement can be used for closing comments on all pages & posts. update wp_posts set comment_status=’closed’
For setting up new hostname with WordPress database is required while moving site to new hostname. For this following SQL commands. In following example we are moving site with hostname dev.example.com to hostname www.example.com. UPDATE wp_options SET option_value = REPLACE(option_value,’http://dev.example.com’,’http://www.example.com’); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value,’http://dev.example.com’,’http://www.example.com’); UPDATE wp_posts SET guid = REPLACE(guid,’http://dev.example.com’,’http://www.example.com’);
Get content with specified number of characters [php] [/php]
Use following commands for updating WordPress directory permissions chown -R username:workgroup . find . -type d -exec chmod 775 {} \; find . -type f -exec chmod 664 {} \;
Use function wpautop to format text with line with html content. It changes double line-breaks in the text into HTML paragraphs [php] [/php]