This topic has 4 replies, 2 voices, and was last updated 6 years by Kieran_SQ.

  • Author
  • #185803
     dmasin
    Participant

    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

    #185804
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #185805
     Kieran_SQ
    Moderator

    You 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 solution

    If 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.

    #185807
     dmasin
    Participant

    OK, 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?

    #185808
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?