[Resolved] CPT content layout + adding css class

Home Forums Support [Resolved] CPT content layout + adding css class

Home Forums Support CPT content layout + adding css class

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #964809
    Morgan

    Wondering if you can suggest a simple way to achieve the below.

    I’m using plugin Helpie FAQ, which creates CPT FAQ pages, pages which appear in a JS accordion faq list, and search results.

    It seems stable and simple enough, yet there are no unique CSS classes in the pages it creates.

    Things I’ve done to try and distinguish the FAQ pages from others:

    I’m probably approaching this all wrong, and hoping someone could suggest a simple fix?

    Also, the Archive layout David helped with breaks anything without a featured image (bcoz .inside-article .entry-header { top: -137px; margin-bottom: -137px;}), which includes these FAQ pages, can I change/add CSS to adjust anything without a featured image?

    #965241
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Do you know which pages you’re targeting exactly? The <body> element has a unique class for each page with its ID, so you can use that to style things for specific pages only.

    Try this CSS instead:

    .inside-article .post-image + .entry-header {
        top: -137px;
        margin-bottom: -137px;
    }
    #966629
    Morgan

    EDIT: I should have said there ARE unique classes, but none for the featured image on the FAQ pages (which is the simplest way of achieving what I want).

    But I’ve wrangled more css control of featured images on the Archive and individual FAQ Pages, which is ultimately simpler across myriad page sizes (instead of hiding feat imgs and further wrangling css).

    An example page was listed above: https://storyclusters.com/helpie_faq/do-i-write-my-own-script/#more-22040.

    #967122
    Tom
    Lead Developer
    Lead Developer

    So if I wanted to target featured images within the FAQs template, I would do this:

    .single-helpie_faq .featured-image

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