The following code is very useful when debugging or fiddling around with hook priorities. Knowing what’s hooked into wp_head() in what order is important, and this function is a great asset!

 

To disable admin bar for all groups of users except admin, just paste the following code in your theme’s functions.php file.

easy-peasy ;)

To display child pages on a parent page in WordPress just edit theme’s functions.php file and and the following code:

Then add the [wpb_childpages] shortcode wherever you need to display child pages. ;)

If you need to Display Child Pages Without Any Shortcode dinamically, you need to add this line of code where you want to display child pages:

The theme will now automatically detect child pages and display them.