Help – Where to add CSS?

This topic contains 6 replies, has 3 voices, and was last updated by  Guust 7 years, 1 month ago.

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

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #397563

    Jeremy Geurtjens
    Expired Member
    Post count: 25

    Hi there,

    I’m not a developer and have only just begun to learn CSS so I can make slight style changes to my all of my websites in the future.

    With regards to GeoDirectory, I love the functionality and intend to purchase the full version/package IF I can improve the look.

    Currently I am running Divi Theme by Elegant Themes because the website is primarily a blog and shop. The directory is being added as an “addition” to the website i.e. it isn’t the sole focus of the website.

    Unfortunately, GeoDirectory doesn’t look great with this theme. For instance, I’ve had to remove some of the sidebar elements. The ones that remain are “cramped” and do not display well. http://thelearninghub.org.nz/places/new-zealand/manawatu-wanganui/palmerston-north/childcare-centres/the-cubby-house/

    So…I would like to attempt to change the look using CSS…BUT as I mentioned earlier, I’m only a beginner when it comes to CSS.

    So my questions are…

    1) To avoid “losing” any CSS customisation in the future (during updates etc.) where should I place the customised CSS? (Child Theme necessary?)

    2) If I only want to change the layout of the GD pages/listing etc. (i.e. not changing the layout of the blog, homepage etc, where should I be placing the CSS code (while ensuring it isn’t deleted during updates).

    3) Any other advice would be greatly appreciated.

    Thank you in advance.

    Jeremy

    #397575

    Kor
    Moderator
    Post count: 16516

    Hi Jeremy,

    Just insert the custom CSS into GD > Design > Scripts > Custom Style CSS and it should be fine. All custom CSS will stay intact even after you’ve updated the plugins or the theme.

    Thanks!

    #397577

    Guust
    Moderator
    Post count: 29970

    1. A child theme is always recommended.
    You can also add CSS using CSS plugins.
    Or add at GD > Design > Scripts > CSS.

    2. See above. But you will need to target the GD pages specifically.
    For example

    .geodir-page #sidebar {width: 30%}

    should only be applied to GD pages.

    Thanks

    #397578

    Jeremy Geurtjens
    Expired Member
    Post count: 25

    Great.

    Thank you both.

    With regards to the child theme, is it still necessary/recommended if the CSS is added with the GD plugin?

    I only ask because in Divi theme (Elegant Themes), when I update Divi I don’t lose the CSS that I’ve used to date (or this just specific to Divi…i.e. if I went to a different theme an update would delete CSS).

    Thanks

    Jeremy

    #397584

    Guust
    Moderator
    Post count: 29970

    It does not matter where you add CSS. Adding it to style.css of a child theme means it does not reload again with every page view. Any other solution makes it load every time a new page is viewed.

    Thanks

    #397593

    Jeremy Geurtjens
    Expired Member
    Post count: 25

    Ok thanks…so adding CSS to a child theme will increase page load speeds (compared to using it within GD plugin.

    Thanks

    Jeremy

    #397648

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount