[Support request] Regarding post layout

Home Forums Support [Support request] Regarding post layout

Home Forums Support Regarding post layout

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #1523627
    Mouse

    Want the main heading of the post and image to come on top (Centered) and content and sidebar to come after, right now I can see the sidebar is coming alongside with the heading and the image.

    #1523698
    David
    Staff
    Customer Support

    Hi there,

    create a Header Element for your single posts:

    https://docs.generatepress.com/article/header-element-overview/

    Add this to the header element content:

    <h1>{{post_title}}</h1>
    {{custom_field._thumbnail_id}}

    Set the Display Rules to Posts > All Posts

    This will place the title and the post thumbnail above the content.

    Then create a Layout Element with the same display rules to disable the Content Title and Featured Image:

    https://docs.generatepress.com/article/layout-element-overview/

    #1524059
    Mouse

    I did that one on of my post and now the image is small and not full sized. Link added below

    #1524125
    Mouse

    Please help me out with this. I’d be very grateful <3

    #1524129
    Mouse

    I want the image to be centered (full image) with title above centered. And want sidebar to start with the main content after that image. With a proper margin/padding so it looks good.

    #1524135
    David
    Staff
    Customer Support

    Do you have any custom functions added to your site?

    Something similar to this one:

    https://generatepress.com/forums/topic/featured-image-in-the-header-element/#post-1472919

    #1524145
    Mouse

    No other function is being added. Its all theme.

    #1524269
    Leo
    Staff
    Customer Support

    What’s the size of the image you are uploading?

    It’s only 300 by 221 from what I can tell and that’s too small.

    #1524404
    Mouse

    Okay then what should I do?

    #1524414
    Leo
    Staff
    Customer Support

    If you want a full-width image, then try uploading something with a width of at least 2000px.

    #1524420
    Mouse

    No you are not getting the point. I want the same featured post image and the title above on posts to be centered and align the sidebar with the content that starts after the featured image.

    #1524432
    Mouse

    Please see the link in private info. as you can see the sidebar starts alongside the header h1. I want the featured image to be centered and want the sidebar to start aligned with the content after.

    #1524464
    Mouse

    Hi still wating on the solution. Please help.

    #1524498
    Mouse

    I am attaching the image on what I want to do with the page. Please look at the image. Added in private info.

    #1524546
    Leo
    Staff
    Customer Support

    Here is what you need to do to create that layout.

    – Create a [post_thumb] shortcode using the following PHP snippet:

    add_shortcode( 'post_thumb', 'db_get_full_thumbnail' );
    function db_get_full_thumbnail() {
        ob_start();
        echo get_the_post_thumbnail( get_queried_object_id(), 'full' );
        return ob_get_clean();
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    – Create a header element with the following content:

    <h1>{{post_title}}</h1>
    [post_thumb]

    – Set the horizontal alignment to center:
    https://docs.generatepress.com/article/header-element-overview/#horizontal-alignment

    Please note that we reply to every question within 12 hours – it’s usually much shorter.

    Thanks for your patience.

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