[Resolved] Support on meta display and change load-more in blog-page and achived-page.

Home Forums Support Support on meta display and change load-more in blog-page and achived-page.

  • This topic has 9 replies, 2 voices, and was last updated 11 months ago by Tom.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1033983
    An Nguyen

    Hi Tom,

    I need your help on 2 issues:

    1/ Last post, you gave me PHP code can change position of footer-meta (categories) above title. It’s worked. However, the summary of post is above the title too.

    add_action( 'wp', function() {
        if ( ! is_singular() ) {
            remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
            add_action( 'generate_before_content', 'generate_footer_meta', 15 );
        }
    } );

    Now I want to display summary below the title (in current HTML-markup it’s the same level of “entry-header”). Now, I wanna reorder its position inside the HTML-markup below:

    <header class="entry-header"></header>
            <h2 class="entry-title" itemprop="headline"></h2>
            <div class="entry-summary" itemprop="text">     -------->(I want it'll be put here)
            <div class="entry-meta"></div>

    +And I can add some customised contents next to summary like(button, readmore, icon read or customised text…). Could you support me with PHP code?

    2/I can set “load more” posts like paginations in achived-page and blog-page? ( Articles: 1 2 3 4…1200 ) .

    #1034466
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    1. I’m not too sure what you mean here. Are you trying to move the post meta inside the entry-summary element?

    2. This isn’t possible at the moment, unfortunately.

    #1034634
    An Nguyen

    Hi Tom,

    I try to summary my idea again. I hope you can help.

    1/I want “entry-summary” is between “entry title” and “entry-meta”. It means that summary displays below post title and above entry-meta. Now, the post summary is above title. You can take a look on my updated link.

    +And I can add some customised contents next to summary like (button, readmore, icon read or customised text…).

    Thanks Tom.

    #1034758
    Tom
    Lead Developer
    Lead Developer

    What if you do this?:

    .entry-summary {
        order: 3;
    }

    Are you wanting to replace the current read more link? If you want to turn it into a button, you can do that in Customize > Layout > Blog.

    #1034795
    An Nguyen

    Hi Tom,

    I used flex for inside-article so I’m clear about that and already did that. However, the summary is at the bottom instead of entry-meta. Both entry-header & entry-summary are the same level. Entry-title & entry-meta are child inside entry-header. Now, the order of entry header is 2, so that bothe entry-title & entry-meta are above entry-summary.

    Current html markup:

    <header class="entry-header"></header>
            <h2 class="entry-title" itemprop="headline"></h2>
            <div class="entry-meta"></div>
     <div class="entry-summary" itemprop="text">

    That why I reckon it should be here. Entry-summary will be a child inside entry-header. Maybe, you will have another better solution for this case.

    <header class="entry-header"></header>
            <h2 class="entry-title" itemprop="headline"></h2>
            <div class="entry-summary" itemprop="text">     -------->(I want it'll be put here)
            <div class="entry-meta"></div>
    #1035454
    Tom
    Lead Developer
    Lead Developer

    So you want the author, date, time to read below the entry summary?

    #1035507
    An Nguyen

    Hi Tom,

    It’s definitely, Tom.

    Thanks.

    #1035819
    Tom
    Lead Developer
    Lead Developer

    Try this:

    remove_action( 'generate_after_entry_title', 'generate_post_meta' );
    add_action( 'generate_after_entry_content', 'generate_post_meta' );

    That will move the HTML. You may need to adjust the “order” CSS values as well.

    #1036931
    An Nguyen

    Hi Tom,

    The code worked perfectly.

    Thanks Tom

    #1037410
    Tom
    Lead Developer
    Lead Developer
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.