Support » Theme: GeneratePress » Blogpage layout

  • Resolved inula


    Hi Tom,

    Searching the forum all day. Can’t just find what I’m looking for.
    I would really like my blogpage to look like this

    First I have to change the order of title and image, i guess.

    Is there a way to do that with some code in functions.php?


    • This topic was modified 1 year, 4 months ago by inula.
Viewing 8 replies - 1 through 8 (of 8 total)
  • With the plugin ‘Category Posts Widget’ I managed to get a good result.
    Still wondering if it would be possible to get the same result with some php 🙂

    Theme Author Tom


    Hi there,

    You can move the featured image above the title with this code:

    add_action( 'after_setup_theme', function() {
        remove_action( 'generate_after_entry_header', 'generate_post_image' );
        if ( ! is_singular() ) {
            add_action( 'generate_before_content', 'generate_post_image' );
    } );

    Then you’d obviously need some CSS to stick it to the left side of the content like that.

    Let me know if you need more info 🙂

    Thanks Tom!!!

    Owww, and if I want to use the thumbnail of the featured image?
    I tried:
    add_action( 'generate_before_content', 'the_post_thumbnail' );

    But that didn’t do the job…

    Theme Author Tom


    Try this:

    add_filter( 'generate_page_header_default_size', function() {
        return 'thumbnail';
    } );

    Let me know 🙂

    Hmmm, I added it before and after the lines you gave me before, but nothing happens.

    O, my mistake.

    It works just the way I would like it to.

    Thanks again, Tom!

    Theme Author Tom


    You’re welcome 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Blogpage layout’ is closed to new replies.