Archived topic
Support on meta display and change load-more in blog-page and achived-page.
9 replies · Started by An Nguyen on October 14, 2019
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 ) .
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.
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.
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.
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>
So you want the author, date, time to read below the entry summary?
Hi Tom,
It's definitely, Tom.
Thanks.
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.
Hi Tom,
The code worked perfectly.
Thanks Tom
You're welcome :)