-
Author
-
January 14, 2018 at 20:19 #185803dmasinParticipant
Hi,
I have the following issue.
At my website soilmodels.com, I have three categories, where I do not want to show meta in archive view (because these posts are submitted by admin). For example, https://soilmodels.com/category/constmodels/, or https://soilmodels.com/?s=plaxis. Note that for other users and categories I want the meta to be shown.
I could do this for single post using kleo_postmeta_enabled filter, works fine.
Unfortunately, I found this filter is not available in archive view. If there was any filter for archive view, I could define classes “el_class=no-meta no-footer” for certain category or for certain post_author, but it seems to me there is no such filter unfortunately.
Did I miss something? If not, would it be possible to add such a filter in some future updates?
Thanks David
January 14, 2018 at 20:26 #185804Kieran_SQModeratorHi,
For this view of posts you can use the class .small-listing before any element you wish to target. As an example the below CSS targets the post-meta only if the class small-listing is present before.
COPY CODE.small-listing .post-header .post-meta { display: none !important; }
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
January 14, 2018 at 20:30 #185805Kieran_SQModeratorYou can also use CSS classes like the below before any CSS to be used only if present
Target only archives
.archive
Target only category pages
.category
Target only specific category page by name
.category-constmodels
Target only specific category page by ID
.category-37
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
January 14, 2018 at 20:39 #185807dmasinParticipantOK, thanks for reply, still not there.
Let me consider this: https://soilmodels.com/?s=plaxis
I want to show meta for all posts, apart of posts where post_author==1. In those, I do not want to show meta. Is it possible somehow?January 14, 2018 at 21:06 #185808Kieran_SQModeratorHi,
I see now, my apologies. As it stands there is no user ID class generated, you would need to edit the below files after copying them into your child theme with your own custom PHP to achieve this. You will need to edit line 12 of these files to add your user class.
COPY CODE/wp-content/themes/kleo/page-parts/post-content-small.php /wp-content/themes/kleo/page-parts/post-content-masonry.php /wp-content/themes/kleo/page-parts/post-content-carousel.php
The PHP would be
author-ID-<?php the_author_meta( 'ID' ); ?>
post-content-small.php line 12
<div class="row post-content animated animate-when-almost-visible el-appear author-ID-<?php the_author_meta( 'ID' ); ?>">
post-content-masonry.php line 12
<div class="post-content animated animate-when-almost-visible el-appear author-ID-<?php the_author_meta( 'ID' ); ?>">
post-content-carousel.php line 12
<li id="post-<?php the_ID(); ?>" <?php post_class(array("post-item col-sm-4")); ?> class=" author-ID-<?php the_author_meta( 'ID' ); ?>">
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
-
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.