Monthly Archives: January 2016

wodpress add shortcode with parameter

Shortcodes can also have configuration parameters known as “attributes.” A pullquote shortcode with a couple of attributes would look like this: [pull-quote quote=”This is my quote!” attribution=”Will Smith”] Now this shortcode has two attributes, quote and attribution. The function to … Continue reading

Posted in Wordpress | Leave a comment

How to register widget item in appearance widget ?

Add following code in functions.php file to add new widget item. /** * Adds Foo_Widget widget. */ class Foo_Widget extends WP_Widget { /** * Register widget with WordPress. */ function __construct() { parent::__construct( ‘foo_widget’, // Base ID __( ‘Widget Title’, … Continue reading

Posted in Wordpress | Leave a comment

wordpress template hierarchy

WordPress uses the query string to decide which template or set of templates should be used to display the page. The query string is information that is contained in the link to each part of your website. It comes after … Continue reading

Posted in Wordpress | Leave a comment

How can I check PHP version if phpinfo() is disabled?

phpversion() will return a full version string. The PHP_VERSION constant also contains the version information. Since PHP 5.2.7, there are also constants containing “sub-info” like PHP_MAJOR_VERSION, PHP_MINOR_VERSION….  

Posted in PHP | Leave a comment

How To Add Sortable Custom Columns in WordPress Dashboard

  Sortable Post Views Column In WP Dashboard |functions.php Open the functions.php file located in your theme´s folder, and add (copy and paste) the following CODE-3A. Save the file and upload it to your server.   1 2 3 4 … Continue reading

Posted in Wordpress | Leave a comment