• Resolved inula

    (@janetb)


    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?

    Thanks!

    • This topic was modified 6 years, 6 months ago by inula.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter inula

    (@janetb)

    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

    (@edge22)

    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 ??

    Thread Starter inula

    (@janetb)

    Thanks Tom!!!

    Thread Starter inula

    (@janetb)

    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

    (@edge22)

    Try this:

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

    Let me know ??

    Thread Starter inula

    (@janetb)

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

    Thread Starter inula

    (@janetb)

    O, my mistake.

    It works just the way I would like it to.

    Thanks again, Tom!

    Theme Author Tom

    (@edge22)

    You’re welcome ??

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