[Support request] Making first post on site full length with featured image

Home Forums Support [Support request] Making first post on site full length with featured image

Home Forums Support Making first post on site full length with featured image

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1489008
    cath

    Hi, in tinkering with my site recently (which I opened a support topic about), apparently the settings changed.

    Previously, my first post was full length with an accompanying featured image, now it is at top as a lone post but not full length and with no image.

    It was long ago that I had set this up so I’m not sure what changed.

    Thank you.

    #1489025
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can use the private information field.

    Let me know πŸ™‚

    #1489179
    cath

    Sure, thanks! Link below.

    #1489363
    cath

    In case that didn’t come through…

    #1489472
    Elvin
    Staff
    Customer Support

    Hi,

    Previously, my first post was full length with an accompanying featured image, now it is at top as a lone post but not full length and with no image.

    Strange. On my end, the lone post is in full length.

    Here’s what I see on my end. – https://share.getcloudapp.com/YEuyX478

    But it did not have a featured image as mentioned.

    Upon further inspection, I see that you’re using Simple CSS plugin and it had this CSS code.

    .blog .type-post:first-child .post-image,.archive .type-post:first-child .post-image { 
    display: none; 
    }

    Just change the display:none; property to display:block; for the featured image of the first post to be visible.

    A wise man once said:
    "Have you cleared your cache?"

    #1524634
    cath

    Hi Elvin, thanks for your help. I’m just coming back to this now.

    Changing the CSS code was great and a success. So the first post featured image is now showing.

    However, first post is still not full length and the screen grab (above) isn’t full length either as far as I can see. I’ve checked on different browsers, phone, etc., and all the same result.

    Thank you!

    Cath

    #1524643
    Elvin
    Staff
    Customer Support

    I’m not sure I understand what you meant by “full length”.

    Can you provide any mockups photos or reference site of what you’re trying to achieve?

    If you meant for .post-image to go full-width of its container, add this CSS:

    .post-image img {
        width: 100% !important;
    }

    If you want the first post to go full page width, meaning it goes on top of the right sidebar, I’m afraid that’s not possible with the current setup.

    A wise man once said:
    "Have you cleared your cache?"

    #1791956
    cath

    Hi, just coming back to this now. I want the first post on the site to be full length as in the FULL post vs. an abbreviated post for the first post on the site. Then, the rest of the posts can be abbreviated.

    If whoever is reading this doesn’t know the answer, can you bump it to Tom or someone else? In the past, I’ve gotten an answer.

    Thank you.

    #1792394
    David
    Staff
    Customer Support

    Hi there,

    Tom provides a PHP snippet here that will make the first post full content:

    https://generatepress.com/forums/topic/most-recent-post-full-excerpts-below/#post-843833

    #1802061
    cath

    Hi David,

    Thank you. Awhile back I had done that but my site got messed up at one point so maybe that CSS got removed.

    Now, when I added it back, nothing changed. I do have some other CSS in the Simple CSS and I skipped a line between the two snippets (the one already there and this one). Would that cause it not to work? Do I need to do it immediately on the line following the other ?

    Thank you.

    Cath

    #1802214
    Ying
    Staff
    Customer Support

    Hi Cath,

    Tom’s solution is PHP, not CSS, this is how you add PHP:
    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Hope that works for you πŸ™‚

    #1806497
    cath

    Hi Ying, I’ve been using Generate Press for 7 years or more back when Tom answered questions personally and his ‘fix’ back then was via Simple CSS plugin code – I think, at least I don’t remember it being complicated or hard to get an answer to. I’m really tired, this is taking too much time to get an answer, and not sure why this is so hard. Even what you linked to is not really helpful. Why can’t the exact way to do it be in your response? Which is how it used to be when I would ask a question like this. Tom used to link to pages that just outlined exactly how to do it. This doesn’t.

    Maybe it was Code Snippets… but I just updated and can’t figure out where to add the code.

    In addition, this should be an option automatically. I’m really getting frustrated here, I’m sorry to say.

    #1806540
    Ying
    Staff
    Customer Support

    Hi Cath,

    Since we don’t know if you are using a child theme or not, we have to list all the methods in the article, so that you can choose based on your own situation.

    So if you are not using a child theme, please install code snippet plugin, and add this code into it:

    add_filter( 'generate_show_excerpt', function( $show ) {
        global $wp_query;
    
        if ( 0 == $wp_query->current_post ) {
            return false;
        }
    
        return $show;
    } );

    It looks like this:
    https://www.screencast.com/t/TnPBWHm3md4

    Hope this time it’s clear enough πŸ™‚

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.