• Resolved wdejesus

    (@wdejesus)


    Hi Everyone. I created a blog page and went to my settings and chose the page as my default blog page. The thing is I want a different header and I am trying to do is_page(‘blog’) and nothing is working. I am still showing the same featured post image which I don’t want. When I try it for other pages, it works perfectly.

    Any insight would be great.

    Thank you!

    Will

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator cubecolour

    (@numeeja)

    Can you provide a link to your blog page please?

    Thread Starter wdejesus

    (@wdejesus)

    Hi Cubecolour,

    This is the link. Right now because my other featured posts are set to private they do not show up. This is the script that was provided to me. I cannot change the main featured image like the other pages for this particular page.

    <?php
    
    		if(has_post_thumbnail() && !is_single()) {
    
    			(int) $thumb_id = get_post_thumbnail_id();
    
    			$thumb_details = wp_get_attachment_image_src( $thumb_id, 'full' );
    
    		} elseif(is_home() || is_single()) {
    
    			$page_for_posts = get_option('page_for_posts');
    
    			global $wp_query;
    
    			if ($wp_query->is_posts_page && has_post_thumbnail( $page_for_posts )) {			
    
    				$thumb_details = wp_get_attachment_image_src( $page_for_posts, 'full' );
    
    			} else {
    
    				$thumb_details = NULL;
    
    			}
    
    		} else {
    
    			if(!empty($post->ancestors)) {
    
    				(int) $ancestor_id = end($post->ancestors);
    
    				$thumb_id = get_post_thumbnail_id($ancestor_id);
    
    				if(empty($thumb_id)) {
    
    					$thumb_details = NULL;
    
    				} else {				
    
    					$thumb_details = wp_get_attachment_image_src( $thumb_id, 'full' );	
    
    				}
    
    			} else {                                                     
    
    				$thumb_details = NULL;				
    
    			}                                      
    
    		}
    
    		$thumb_path = (!empty($thumb_details) ? $thumb_details[0] : '/wp-content/uploads/2013/12/main-banner-default.png');
    
    		$splashInterior = "width: 1126px; height: 344px; background: url(" . $thumb_path . ") no-repeat;";
    
    	?><!-- end of Jessica's script -->
    
      		<div id="inside-banner" style="<?php echo $splashInterior; ?>"></div>
    
      		<?php  }?>
    Moderator cubecolour

    (@numeeja)

    Can you provide a link to where I can see the page on your site please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blog Page’ is closed to new replies.