Display content on Single page

Unless you have generated metafields called ‘home’, ‘about’, ‘contact’ and ‘services’ in functions.php using add_post_meta your calls to get_post_meta will always return false. So if you test if they are true later on, the answer is ‘no’ and nothing will be displayed.

image sizes – finding and removing

By default WP support 3 image sizes ie Thumbnail, Medium and Large. If you want to remove any of these then you can use a filter “intermediate_image_sizes_advanced” to remove the default image sizes. function wp_remove_default_image_sizes( $sizes ) { unset( $sizes[‘thumbnail’] ); // remove thumbnail support unset( $sizes[‘medium’] ); // remove medium support unset( $sizes[‘large’] ); … Read more

How to perform str_replace on the results of wp_list_pages

Change your $child in your code to $InnerPages, like this: $InnerPages = wp_list_pages(‘child_of=”.($post->post_parent != false ? $post->post_parent : $post->ID).”&title_li=&echo=0’); $InnerPages = str_replace(‘<ul class=”children”>’, ‘<ul class=”children”><li>Overview</li>’, $InnerPages); echo $InnerPages; You were saving your change in $child but then displaying $InnerPages which was unchanged. Additionally the class is children and not child and must match exactly to … Read more

Breaking Categories Up into Individual Divs

You can customize the way wp_list_categories() render the categories by using a custom Walker and pass it as an argument of the function : $args = array( ‘show_option_none’ => __( ‘No treatment categories’ ), ‘taxonomy’ => ‘treatment-categories’, ‘title_li’ => __( ‘Treatment Categories’ ) ‘title_li’ => ”, ‘walker’ => new My_Walker_Category() ); if ( count( get_categories( … Read more

After WP 4.6.1 Update , Blog page started giving 500 error

There are many possibilities that causes this error. There might be your theme is not comaptible to wordpress 4.6.1 Please make on debug mode by writing change below lines in wp_config.php from define(‘WP_DEBUG’, false); to define(‘WP_DEBUG’, true); and add below line to make debug log on define(‘WP_DEBUG_LOG’, true); And then run your front end and … Read more