-
AuthorPosts
-
July 23, 2018 at 7:46 pm #988860
Hello i have a problem. I have 7 categories with there own logo. So i Made a template and place on the top a $logo var. and place pull this in the page but that didn’t work is there a solution for my problem? I want to select an template and the richt logo is vorming up
July 23, 2018 at 8:15 pm #988871Hey MarcusEls,
Have you tried just manually putting the logo image directly in your custom template file?
Best regards,
Jordan ShannonJuly 23, 2018 at 8:20 pm #988874i realy don’t understand your construct – but you can change logo for pages , categories , posts, etc if you know something about conditional phrases in wordpress.
a single post got a categorie – if you like to change all logos for single post with a given category use
add_filter('avf_logo','av_change_logo_for_categories'); function av_change_logo_for_categories($logo){ if( is_single() && in_category( 'slider1' ) ) { $logo = "https://webers-testseite.de/wp-content/uploads/layerslider/Parallax-Slider/truc.png"; } return $logo; }
you can modify this with a lot of elseif rules and for pages , page arrays etc. pp like:
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo){ if( is_page(21) ) { $logo = "http://www.domain.com/wp-content/uploads/logo21.jpg"; } elseif ( is_page( array( 42, 54, 6 ) ) ) { $logo = "http://www.domain.com/wp-content/uploads/logo22.jpg"; } elseif ( is_category( 'slider1' ) ) { $logo = "http://www.domain.com/wp-content/uploads/logo23.jpg"; } elseif( is_single() && in_category( 'slider1' ) ) { $logo = "http://www.domain.com/wp-content/uploads/logo24.jpg"; } return $logo; }
all single posts with category: slider1 will get logo24
if you got a list of posts of category slider1 ( has_category) logo23July 23, 2018 at 9:07 pm #988902by the way dear Mods why doesn’t this do the job if i want to proof if a portfolio has “frontside” category ???
elseif ( is_singular( 'portfolio' ) && has_term( 'frontside', 'portfolio') ) { $logo = "https://webers-testseite.de/wp-content/uploads/unmute.png"; }
July 24, 2018 at 1:03 am #988983Hi,
@Guenni007 I’m not sure why that happens, I need to test this method but that might take some time.However, we can use header widgets and add multiple logos easily. Please check out the enfold documentation.
Best regards,
VinayJuly 24, 2018 at 1:20 am #988984well i understand this : Hello i have a problem. I have 7 categories with there own logo that he likes to change the logo for each category. – and not to have multiple logos
July 24, 2018 at 2:43 am #988998Hi,
Ah! yeah could be, I did not understand the requirement correctly.
To display a category based logos it is best to use the custom script.
Best regards,
VinayJuly 24, 2018 at 8:35 am #989059Thanks, the solution of Jordan I have followed and is the best to explain to my client how it works. also every category has his own color don’t no of this is possible
- This reply was modified 6 years, 4 months ago by MarcusEls.
July 24, 2018 at 1:16 pm #989158Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
Don’t forget to bookmark Enfold Documentation for future reference.Thank you for using Enfold :)
Best regards,
Vinay -
AuthorPosts
- The topic ‘Morw than one logo’ is closed to new replies.