Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Support request] Customize Blog Post

Home Forums Support [Support request] Customize Blog Post

Home Forums Support Customize Blog Post

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #392574
    Beau

    I need to reorganize the information on the single blog post template.

    Instead of leading with the featured image, I’m going to have the blog title across the top with the date and then the blog post categories underneath and then have a large centered featured image, followed by the full post.

    How do I go about editing this template? I can add to single.php, but I don’t dare remove any of it, as there isn’t much actual PHP or HTML.

    I’ll also need to style the ‘previous post | next post’ as well.

    Any help is much appreciated!

    #392985
    Tom
    Lead Developer
    Lead Developer

    Hi Beau,

    Do you have an example you can link me to? Sounds like you’ll be able to use the Page Header add-on.

    Let me know 🙂

    #393225
    Beau

    Sure, here is what the individual blog posts need to look like:

    http://clients.amlapiana.com/kimstrobel/strobel-ed/website/rnd6/index8.html

    Thanks!

    #393274
    Tom
    Lead Developer
    Lead Developer

    Ok, so first you’ll want to create a Page Header and apply it to your single posts. More info on that here:
    https://docs.generatepress.com/article/page-header-overview/
    https://docs.generatepress.com/article/page-header-global-locations/
    https://docs.generatepress.com/article/page-header-template-tags/

    Then you’ll need to hook your featured image into the content:

    add_action( 'generate_before_content', 'tu_add_featured_image' );
    function tu_add_featured_image() {
        if ( has_post_thumbnail() ) {
            the_post_thumbnail();
        }
    }
    #393277
    Beau

    Awesome thank you! Implemented and it’s close but I’m getting this:
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/haselti2/public_html/strobeleducation.com-staging/wp-content/plugins/gp-premium/page-header/functions/functions.php on line 1119

    #393282
    Tom
    Lead Developer
    Lead Developer

    Do you have {{custom_field._thumbnail_id}} added in your content? If so, remove that, as we’re adding your featured image after the page header.

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