- This topic has 10 replies, 3 voices, and was last updated 4 years, 4 months ago by Theme Horse Support Team.
-
AuthorPosts
-
April 15, 2020 at 9:38 am #76764mostinterestingpeopleinworldParticipant
Hi,
In my homepage, under “Editor’s Pick” and under “trending stories” section, there are the same 2 latest post.
I want to remove the duplication, so that the ëditor’s pick” section will include the latest post that doesn’t appear in the “trending stories” section.What’s the code for that?
April 21, 2020 at 5:32 am #76966Theme Horse Support TeamKeymasterHi there,
Just go to the header.php file on line no:340 and paste the below line of code.
if ( $newscard_settings['newscard_banner_featured_posts_1_hide'] === 0 ) { $featured_post_1_ids = wp_list_pluck( $newscard_get_featured_post_1->posts, 'ID' ); $post_type_fp_2['post__not_in'] = array_unique( array_merge( $post_type_fp_2['post__not_in'], $featured_post_1_ids ) ); }
Note: Make sure to create child theme for any code customization so that your code won’t be lost while updating the theme to next version.
June 13, 2020 at 5:46 pm #78467mostinterestingpeopleinworldParticipantFor some reason I didn’t get your answer to my email and meanwhile changed theme…
I got back to these theme now and your solution works!
However, I wanted to know how how can I get a homepage with 0 repetitive posts (except “Main stories” which I don’t mind repetitive there from other sections).Meaning, I want to display posts as follow:
1. 2 latest posts under “trending stories”
2. 2 posts before them – under “editor’s pick”
3. 4 posts before them under “popular stories”
4. below – earlier posts (that aren’t appear in any of the sections above)So what is the proper code for that?
Thanks again!
June 14, 2020 at 5:51 am #78477Theme Horse Support TeamKeymasterWe apologize, we might have missed your email. Thanks for getting back to our Theme again 🙂
Sorry as per your requirement you need to hire a developer to customize the Theme code for you,
currently you can only make this possible by showing the post through category where you can create different categories and assign the desired posts to desired category. This will help you to show different posts on different sections.Thanks
June 16, 2020 at 4:30 pm #78528mostinterestingpeopleinworldParticipantthanks again for your reply 🙂
Can you please explain further the categories sections?After you’ve posted the first code chunk above – it worked well; “editor’s pick” and “trending stories” doesn’t contain same posts (for example, one contains posts 1+2, the other contains post 3+4).
However, the section “popular stories” below them contains the 4 posts they already contain, even though I have over 8 different categories in my site.
How can I avoid “popular stories” to repeat the posts under “editor’s pick” and “trending stories” sections?June 16, 2020 at 7:51 pm #78532mostinterestingpeopleinworldParticipant*To be clear – I’m asking only about the “popular stories” section, because I understand what’s below is more complicated
June 17, 2020 at 11:42 am #78552Theme Horse Support TeamKeymasterYes we do understand your requirement but this is also complicated as it needs more coding with more conditions check. Its better you manager to show through assigned category.
Thanks
June 19, 2020 at 8:31 am #78633mostinterestingpeopleinworldParticipantSo I’ve created 8 different categories with one post per category, but still the last 4 posts that appear under “editor’s pick” and “trending stories” sections, repeat themselves under the “popular stories” section.
What did I missed?
Should I define which categories appear under each section? If so, how do I do it?June 19, 2020 at 1:11 pm #78640Theme Horse Support TeamKeymasterif you want to show on popular stories section then you can create a new category like ‘popular’ and then you can only assign that ‘popular’ category to those post which you want to show on that section then from the customizer you can set to show through category selecting ‘popular’.
Thanks
June 20, 2020 at 7:27 pm #78667mostinterestingpeopleinworldParticipantGot it.
Thanks a lot!June 21, 2020 at 4:17 am #78685Theme Horse Support TeamKeymasterWelcome @mostinterestingpeopleinworld,
Please let us know if you have any other queries regarding the Theme.
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.