Tag selector CSS styling

This topic contains 5 replies, has 3 voices, and was last updated by  Paolo 5 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #473178

    Kristjan Reinsch
    Expired Member
    Post count: 38

    Hi,

    I am sure this question has been asked before, but I could not find the answer in the forum during the last hour. I would like to style the tags and would simply like to know how:

    1. I can select an individual tag (e.g. in the detail listings page) to style it with CSS
    2. I can delete the ‘and’ before the last tag shown in case of multiple tags.

    Thank you,

    #473187

    Alex Rollin
    Moderator
    Post count: 27815

    I assume you want to do this for GDV2? Because GDV2 is going to be live on wp.org Very Very shortly.

    In either case a custom class would need to be added to the output that would probably be a span tag including the CPT and Cat ID. That would be a customization.

    Can you share a URL so we can see more of the context?

    #473189

    Kristjan Reinsch
    Expired Member
    Post count: 38
    This reply has been marked as private.
    #473193

    Alex Rollin
    Moderator
    Post count: 27815

    I will flag this for the developers in case they know of a workaround.

    #473194

    Kristjan Reinsch
    Expired Member
    Post count: 38

    That’s more I could ask for! Thanks!

    #473411

    Paolo
    Site Admin
    Post count: 31206

    This can all be done with CSS.

    
    
    .geodir-tags {
        font-size: 0;
    }
    .geodir-tags a {
        font-size: 15px !important;
    }
    .geodir-tags a {
        font-size: 15px !important;
        padding: 3px 7px;
        background: #ccc;
        border-radius: 5px;
        color: #000;
        margin-right: 5px;
    }
    /* change background color of 1st tag */
    .geodir-tags a:nth-child(1) {
        background: #ff0;
    }
    /* change background color of 2nd tag */
    .geodir-tags a:nth-child(2) {
        background: #0ff;
    }

    Just add more of the last rules to cover all your tags.

    Thanks

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket