• Resolved montebianco

    (@montebianco)


    As an extension of a previous topic about body classes, how would you add the directory name and/or the categories as a class to the post listing displays? It is not possible to identify the post from different directories in the single location view. ./single-location/ ?

    The directory type data-listing_type=”” is in the filter, but that can’t seem to be used in the css as it is not in a parent div.

    .current .directorist-type-nav__link[data-listing_type=”my-directory”] > .directorist-listing-single__thumb {
    display:none;} does not work

    Trying to add the directory type to the div class=”directorist-listing-single directorist-listing-card directorist-listing-has-thumb directorist-featured”

    The code is adding the featured class.

    It does not appear that the code is adding any other post info such as id either, whereas this is done for wordpress posts along with categories.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter montebianco

    (@montebianco)

    Copied the template files to the child theme directionist>templates>archive and modified the files grid-view.php, list-view.php, loop-grid, loop-list.php to include this line of code :

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

    putting it just above the <div class=”directorist-listing-single…

    This add the classes like: at_biz_dir-location-my-city at_biz_dir-category-my-category atbdp_listing_types-my-directory

    Should be in core code.

    Plugin Support Mahfuzul Alam

    (@mahfuz87)

    Hi @montebianco

    Thank you for the query. I think you have found a solution for this. Directorist is a highly customizable plugin. You can customize this as you want it to be. Every small part of it is customizable. Still, we are trying to keep it simple for the regular users. If you are a developer then you can add any class you want. We know we can easily add a lot of extra features but 99% of the users will not use them.

    Please let me know if you need help with anything else. If you have advanced queries like this you are welcome to contact the support channel – https://prnt.sc/cKSW-z2RTXrs

    Kind Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS selectors for post listings’ is closed to new replies.