Category Archives: Wordpress

Taxonomy query in wordpress (Tax-Query)

You can use following taxonomy query in wordpress one of slug of categories is ‘students’  ‘post_type’=>’testimonials’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘testimonial’, // ‘custom-taxonomy-name’ ‘field’ => ‘slug’, // it is what it is: ‘slug’ ‘terms’ => ‘students’, // ‘custom-slug-name’ … Continue reading

Posted in Wordpress | Leave a comment

what is nonce in wordpress?

WordPress Nonces. A nonce is a “number used once” to help protect URLs and forms from certain types of misuse, malicious or otherwise.WordPress nonces aren’t numbers, but are a hash made up of numbers and letters. Nor are they used … Continue reading

Posted in Wordpress | Leave a comment

To add div wordpress inner menu item using walker class

walker

Posted in Wordpress | Leave a comment

To get current location using google map with lat-long

location

Posted in Google location, PHP, Wordpress | 1 Comment

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