[Resolved] Elements Headers and Custom Post Types: Changing Logo URL, and CSS separator

Home Forums Support [Resolved] Elements Headers and Custom Post Types: Changing Logo URL, and CSS separator

Home Forums Support Elements Headers and Custom Post Types: Changing Logo URL, and CSS separator

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1677525
    Mark

    site is 42Freeway.com. Two behavior challenges with CPT archive section.

    Started a sub-section Destinations. Kind of like a site within site.
    Destinations is a Custom Post Type, created with CPT-UI

    Main: https://42freeway.com/
    Folder: https://42freeway.com/destinations/
    – This is an Archive page to show all destinations posts.
    – I used CSS to hide the page title “Archives: Destinations”

    Two small questions!

    1) Separator CSS on archive
    At the main URL I added the CSS below which puts a line between posts on the main page blog archive (from support here). This does not work on my CPT Archive. I was looking at the DOM to see what should be added to CSS… and honestly it looks like it should be .archive, which I have.

    .blog .post, .archive .post {
    border-bottom: 1px solid #A9A9A9;
    }

    2) Element Header, change Logo nav URL: The CPT has a new header, really just to change the logo. BUT if someone were to click that logo I want them to stay in the Destinations section. It goes back to main page URL. In elements header there is no field to change that.

    #1677714
    Leo
    Staff
    Customer Support

    Hi there,

    1. It doesn’t work as CPT doesn’t have the post class involved as it’s not a “post” post type:
    https://www.screencast.com/t/NTcmZmGFC

    You could try something like this:

    .blog .post, .archive .post, .archive .type-destinations {
        border-bottom: 1px solid #A9A9A9;
    }

    2. Give this filter a shot:
    https://docs.generatepress.com/article/generate_logo_href/

    #1677991
    Mark

    Leo… thank you!

    1) I just put the CSS in and it worked like a charm. Not to diminish from your answer, but now that I see that I’m like “I shouldve figured that out!”
    1b) Is my way of doing this “site subsection” legit? consider its the same thing as a newspaper site having Sports and Business sections. (I see you guys get a TON of support request so understand if this question is too involved to get a reply. Sometimes I think too hard)

    2) Thank you! I havent put this in yet.. I used to have the code snippets plugin but had recently removed. Have to decide if I want that back again.

    #1679193
    Leo
    Staff
    Customer Support

    1b) Is my way of doing this “site subsection” legit? consider its the same thing as a newspaper site having Sports and Business sections. (I see you guys get a TON of support request so understand if this question is too involved to get a reply. Sometimes I think too hard)

    I don’t understand the question here.

    Can you explain a bit more?

    #1680018
    Mark

    Short Summary: Is there a recommended GP way to create a subsection URL (and posts) with the theme.
    Such as: https://42freeway.com/destinations/
    (I have test posts there now)

    More:
    I want a subsection of my site, defined by the URL (and maybe style changes).
    I did this by creating a custom post type “destinations” using CPT UI plugin and then using a second plugin “Custom Post Type Permalinks”, I routed the destinations posts to the sub URL section.
    Was this a good way of doing?

    really just curious if you guys have prior recommendations on this or an immediate idea. I kind of think this is outside the norms of standard support requests. ha!

    And I am very impressed you are keeping up with this!

    #1680754
    Leo
    Staff
    Customer Support

    CPT should be the way to go for that 🙂

    #1684347
    Mark

    ty. closing this out. now I am working on styling the posttype page… which I think I need a child theme setup. I’ll have other questions in a new post. ha

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