Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1353693

    Hi!
    We are targeting an image by its ‘tag’ successfully using .tag-name (.tag-sold)
    But I am unable to do so when the image is being displayed in the ‘blog posts content element’ from the avia builder.

    See links below

    Thank you

    #1353743

    Hey finchkelsey,

    Thank you for the inquiry.

    You may need to target the post based on its ID.

    Example:

    .slide-entry.post-entry-1570 {
        display: none;
    }
    

    This should hide the post with the ID 1570 in the list.

    Best regards,
    Ismael

    #1353854

    Hey thanks for the support, I think I didn’t explain myself well.

    I was able to target a div using the post tag, this applies a SOLD ribbon to the image (first image of the gallery)

    I am looking to target the feature image of this post inside the blog posts grid with the same SOLD ribbon also using the post tag. I have been unsuccessful.

    This works – .tag-sold .slide-image::before {
    content: url(‘//carfarmers.com/wp-content/uploads/2022/06/sold-small.png’);
    max-width:40px!important;
    max-height:40px!important;
    z-index:1;
    position: absolute;
    top: 60px;
    left: 45px;
    }

    This does not – .tag-sold #ngg-image-1::before {
    content: url(‘//carfarmers.com/wp-content/uploads/2022/06/sold-small.png’);
    max-width:40px!important;
    max-height:40px!important;
    z-index:1;
    position: absolute;
    top: 60px;
    left: 45px;
    }

    See below for details

    #1353869

    Hi,

    Thank you for the update.

    How did you apply the tag-sold class name to the gallery? Unfortunately, you cannot apply the same class name directly to the item in the blog posts grid, so using the css code the we previously suggested is necessary.

    Best regards,
    Ismael

    #1353963

    The .tag-sold is a post tag named ‘sold’ applied to the tags.
    I’m trying to target the post that has been tagged with ‘sold’ so that all a user has to do is tag the post ‘sold’, and the ‘sold flag’ will display.

    Targeting the tag, ‘sold’, using .tag-sold is working on the image in the gallery. I am unable to find the correct css path to the feature image of the post, when its using the blog grid display from the alb.

    The css you suggest requires coding and targets per page, this would not work in the use case we are looking for.

    Can you help me with the css path…thank you

    Thank you

    #1354080

    Hi,

    You will have to retrieve the post tags and include the tag names in the class attribute of the blog post entries. To do that, you have to modify the themes/enfold/config-templatebuilder/avia-shortcodes/postslider/postslider.php file directly.

    Please completely erase the content of the postslider.php file and replace it with the following code.

    // https://pastebin.com/YijW2kuU

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.