Example Code:

 

This will turn your currency number into presentable format, i.e. facebook likes or twitter followers.

Output

 

Use this WordPress conditional tag to display content for a certain Page ID and it’s Children.

Example Uses
Use this to display certain JavaScript or CSS for a particular page and it’s children in your header. Load different header images in different pages, Show or Hide Widgets, etc. There are endless possibilities.

The sample code below will display “Apples” for Page ID “10″ and it’s children otherwise show “Oranges”

Where To Put The Code
You can use this tag in or outside the WordPress Loop. Use on WP templates files like single.php, page.php, index.php or your own custom theme templates a great example for visit www.diligentcreators.com they use this in their logo it changes on each section of their website.

Note:
This will only work with Page ID not with Page Slug

%d bloggers like this: