🎉 Happy 4th of July! Get 15% off GP Premium with the discount code: 4THOFJULY2020

[Resolved] Category Icon in generatepress

Home Forums Support Category Icon in generatepress

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1143384
    Phil

    Hi Guys,

    many appologies if this has already been covered, is just have been searching, tried various plugins … all with no success.

    I simply want to display a custom image/icon next to the category name in a post. Very little out there in the way of plugins, and the ones which I have tried do not display.

    For info, the screenshot shown is from EssentialGrid used with generate press.

    Any help would be greatly appreciated.

    Best Regards,

    Phil

    Screenshot

    #1143499
    David
    Staff
    Customer Support

    Hi there,

    any chance i can get temporary access to see the site ?

    #1143794
    Phil

    Hi David,

    Sure! Generic access account is username: iluser passwd: iluser.

    If you require admin access, please let me know and I will send on to you.

    The site is not live as such, just in very early alpha stage!

    Thanks in advance,

    Phil

    #1144146
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That username doesn’t seem to be working – can you double-check?

    Let me know 🙂

    #1144329
    Phil

    Hi Tom,

    many apologies, left the 1 off.

    It’s”

    Username: iluser1
    Password: iluser1

    Again, let me know if you require admin access, and will forward this on.

    Thank you again.

    Best Regards,

    Phil

    #1144478
    David
    Staff
    Customer Support

    Try this CSS:

    .esg-entry-cover .esg-tc a[rel~="category"]:before {
        content: '\f005';
        font-family: "Font Awesome 5 Free";
        margin-right: 0.5ch;
    }

    You need to change f005 for the FA Icon you want.
    This will apply to ALL posts with a category tag.

    #1144486
    Phil

    Awesome!!!!! Thank’s David, exactly what I wanted.

    Just need to create and upload my own SVGs to FA now, so I can display those instead.

    Huge thanks,

    Phil

    #1144489
    Phil

    Sorry David, what I required was a specifc image for each catergory, so whenever that category is displayed, the relevant image/icon is displayed next to it.

    Phil

    #1144498
    David
    Staff
    Customer Support

    Slight problem there – the plugin does not add the category-slug in its markup not even the rel tag…. hmmmm

    Could try this:

    .esg-entry-cover .esg-tc a[title~="Beach"]:before {
        content: '\f005';
        font-family: "Font Awesome 5 Free";
        margin-right: 0.5ch;
    }

    Using the title attribute to pick out a unique work in your categories should do it – if it does then only the beach categories ill display it

    #1144503
    Phil

    Yep, that absolutely did it! Just have to replicate same code now for each category, with different title and image that I require.

    Thanks again David – definately solved it now!!!

    Phil

    #1144524
    David
    Staff
    Customer Support
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.