Published content not displaying, getting not found message

Please reset your permalink. Go to http://yourdomain.com/wp-admin/options-permalink.php and just click Save Changes button. Edited: Try these steps: Make sure the homepage exists. Go to Settings > Reading options, see which page is used for homepage and check this page’s status. Update WordPress. Keep backup before you proceed. Check each of the plugins. Deactivate and re-activate … Read more

Every second post different class in blog view

Give this a try? function oddeven_post_class ( $classes ) { global $current_class; $classes[] = $current_class; $current_class = ($current_class == ‘odd’) ? ‘even’ : ‘odd’; return $classes; } add_filter ( ‘post_class’ , ‘oddeven_post_class’ ); global $current_class; $current_class=”odd”; and be sure you’re using <?php post_class(); ?>

How to show show the Second page title in the page

get_post_ancestors() returns all of the ancestors hierarchically. As you only want to display the 2nd level post title on 4th post page, you can do something like – global $post; $parents = get_post_ancestors( get_the_ID() ); if( count($parents) == 4 ){ // ancestor1 = 1st parent, ancestor2 = second. echo get_the_title($parents[‘1’]); // index starts from 0, … Read more

How to add a class to edit_post_link?

Assuming you are reading this answer in the future (December 2015 or later). Starting from WordPress 4.4.0, The $class argument was added. So: edit_post_link( __(‘Edit’), ”, ”, 0, ‘post-edit-link btn btn-default’ ); See edit_post_link documentation.

How can you display all sibling categories to a post?

Yes, you can. The Function to help you out here is get_term(). The return of this function delivers you a value for parent. Using this ID, you can get the Parent Taxonomy (as long as it is hierarchical like the categories). Attention To get this function to work correctly, you have to select JUST the … Read more

How to display two random-post sections that are each under their own category

The relevant code is here: query_posts(“cat=25&orderby=DESCd&showposts=3&$randomArticlesNum&caller_get_posts=1”); That is the query that is pulling the posts, and that is what you want to alter. Your previous theme builder also did something that should never be done– used query_posts(). Also, both showposts and caller_get_posts have been replaced. That is very old code or your previous programer did … Read more