Header and Footer options in pages and posts

You can do this by Using template page as well as custom fields. Let us say your custom fields value are 1 and 2 for header your conditions will be. if($header==1) { get_header(1); } else {get_header();} And similarly for footer it will be if($footer==1) { get_footer(1); } else { get_footer(); }

Post page still linked to old site

I think this can be the cause from some permalink settings. In the Settings-> Permalinks, you can click the “Save” button, and the permalinks will refresh. I’m not sure that will work, but that’s where I will first look.

Display post count on archive page in reverse order

You can give a try to this within a loop <?php echo $wp_query->found_posts – $wp_query->current_post ; ?> $wp_query->found_posts gives the total number of posts found matching the current query parameters. So the if there are 20 posts, result for each post should look like this For 1st post it will display 20, i.e. 20-0=20 For … Read more

Imported Posts missing summary text on staging site

Although there’s little chance that something went wrong, first of all make sure that you content is actually there. Just edit a post from your dashboard and make sure it looks like it should, Now, it looks like you have different themes on you live and staging sites, so it most probably is an issue … Read more

View post with specific category id and name which I selected in the backend (drop-down option)

Try this code. <?php $cat_id = get_theme_mod(‘cat_choose’, $defaults); ?> <p><?php echo get_cat_name( $cat_id ); ?></p> <hr> <?php $args = array( ‘post_type’ => ‘post’ , ‘orderby’ => ‘date’ , ‘order’ => ‘DESC’ , ‘cat’ => $cat_id, ‘posts_per_page’ => -1, ); $cat_posts = new WP_query($args); if ($cat_posts->have_posts()) : while ($cat_posts->have_posts()) : $cat_posts->the_post(); ?> <div> <div> <h1><?php the_title(); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)