Home › Forums › Support › Switching logo, header bckgrnd color, link color, menu, and menu text color
- This topic has 3 replies, 2 voices, and was last updated 3 years, 7 months ago by
Fernando.
-
AuthorPosts
-
October 5, 2022 at 11:33 am #2364472
William
For two sections of the site, client would like to switch the logo, header background color, link color, menu (which menu is shown), and menu link text color.
e.g. any pages within /abc/* would get the swapped branding/ menu/ colors
I was thinking of using Elements > Site Header
but that only gets the logo swappedWhat’s the best way of approaching this?
Many thanks in advance!
October 5, 2022 at 7:19 pm #2364687Fernando Customer Support
Hi William,
To clarify, are you referring to sections of a page, or in two pages?
Can you also share the link to the site in question?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let us know.
October 6, 2022 at 4:04 am #2365017William
Hi,
Any pages within /abc/* would get the swapped branding/ menu/ colors
i.e.
This part of the site would get logo branding/ menu/ colors to reflect ABCwww.sample.com/abc www.sample.com/abc/page1 www.sample.com/abc/page2 www.sample.com/abc/subpage/page1This part of the site would get logo branding/ menu/ colors to reflect XYZ
www.sample.com/xyz www.sample.com/xyz/page1 www.sample.com/xyz/page2 www.sample.com/xyz/subpage/page1All other pages outside those two directories would receive the logo branding/ menu/ colors of the main site.
I’ve had partial success using ‘WPCode – Insert Headers and Footers‘ plugin to override CSS for those two directories; and using Elements > Site Header …but that only gets the logo swapped. Also that doesn’t let me set the
ALT,TITLE, orURLfor that alternate logo, so this solution isn’t 100%.Looks like I may be able to leverage the ‘Conditional Menus‘ plugin.
Many thanks!
October 6, 2022 at 5:32 pm #2365731Fernando Customer Support
I see. Thank you for clarifying.
So, for logos, there’s a filter you can use: https://docs.generatepress.com/article/generate_logo_output/
If you set a specific category for
ABCandXYZ, you can have a conditional if/else statement in the filter based on that. Otherwise, if you want to base it on the URL, you’ll need to check the current URL(ex: https://wordpress.stackexchange.com/questions/274569/how-to-get-url-of-current-page-displayed#:~:text=You%20may%20use%20the%20below%20code%20to%20get%20the%20whole%20current%20URL%20in%20WordPress%3A) then set a conditional statement based on this instead.As for the colors, you can create a Hook Element with
<style>tags for the CSS, and then set it to display on specific categories ABC or XYZ. Otherwise, if it will be based on the URL as well, you’ll need to filter the Hook Element display rules: https://docs.generatepress.com/article/generate_element_display/ -
AuthorPosts
- You must be logged in to reply to this topic.