Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1264541
    Diordonovan
    Participant

    Is it possible to have the featured image as header? So every blog post has its own header (its featured image).

    It must be a header as my other pages.

    http://www.millionthingstodo.com is the website, it’s in Ethos.

    #1264822
    Lely
    Moderator

    Hi There,

    Thanks for posting in. Yes that is possible. Please try adding the following code on your child theme’s functions.php file:

    function x_featured_image_as_header (  ) {
      if ( is_singular('post') ) {
           $thumb = get_the_post_thumbnail( NULL, 'entry', NULL );
           printf( '<div class="entry-thumb">%s</div>', $thumb );
      }
    }
    add_action('x_before_view_ethos__breadcrumbs', 'x_featured_image_as_header');

    Hope this helps.

    #1264961
    Diordonovan
    Participant

    Thank you! Now I need it fullwith and you see the image twice now. I want to remove the second one above the title.

    As you can see on http://www.millionthingstodo.com/test-3/ and http://www.millionthingstodo.com/10-dingen-wil-brazilie-eten-en-drinken/

    #1264964
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> Global CSS :

    .single-post .entry-thumb {
        width: 100%;
    }
    .single-post .entry-featured {
        display: none;
    }

    Hope that helps.

    #1264968
    Diordonovan
    Participant

    I removed the image already. At the moment I only want to have the header image fullwidth.

    #1264974
    Paul R
    Moderator

    Hi,

    Kindly change the code provide with this.

    
    .single-post .entry-thumb,
    .single-post .entry-thumb img {
        width: 100%;
    }
    .single-post .entry-featured {
        display: none;
    }
    

    Hope that helps.

    #1264985
    Diordonovan
    Participant

    Thank you! Is it also possible to have it like my pages, because at the moment the images are very stretched.

    Here some examples:
    http://www.millionthingstodo.com/over-million-things-to-do/
    http://www.millionthingstodo.com/reisvideos/
    http://www.millionthingstodo.com/reisgidsen/

    #1264993
    Christopher
    Moderator

    Hi there,

    The images dimensions are different. It should be around 1200*800px.
    Also note that on this page http://www.millionthingstodo.com/over-million-things-to-do/, image is being displayed as background and the other is displaying inside <img> tag.

    Thanks.

    #1265016
    Diordonovan
    Participant

    And isn’t it possible to insert this as a background and change the single page in php?

    #1265019
    Christopher
    Moderator

    Hey there,

    Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!

  • <script> jQuery(function($){ $("#no-reply-1264541 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>