Closed fredpchang closed 3 years ago
I'm not sure if this is really the desired behaviour, if you hide the featured articles because they appear in the slider there is a real chance that people won’t be able to see some of those posts, I think there is no issue if people see some post on different places, that's better than not seen some post at all.
If you really want to hide duplicate entries then you can do the following:
Unzip the theme folder.
Open the file partials/loop.hbs
with a text/code editor.
Locate the following line:
<article class="m-article-card {{#unless feature_image}}no-picture{{/unless}} {{post_class}}">
<article class="m-article-card {{#unless feature_image}}no-picture{{/unless}} {{post_class}} {{#is "home"}}{{#if featured}}{{#has index="0, 1, 2, 3, 4"}}hide-card{{/has}}{{/if}}{{/is}}">
This line of code adds the class hide-card
to the articles if they are featured, listed in the home page and if their index is less than 5 which is the max number of slides in the featured slider.
Save your changes.
Zip the theme folder and upload it again.
Inject the following style in the Ghost Admin (Settings -> Code injection -> Site Header):
<style>
.hide-card {
display: none !important;
}
</style>
Thanks, Eduardo! That worked :)
I want to "feature" some articles on the home page, but featuring the most recent post results in duplicate entries. I hope the theme can be improved so that if article is in featured, it will not appear again next to it: