-
AuthorPosts
-
February 14, 2015 at 3:32 am #396090
Hi there,
I’d like to use a different header logo on some pages instead of the default specified in the theme options.
So, for example on this page /example-parent/ & all its child pages, as well as one specific portfolio category.
I’m using Enfold child – any ideas what might be the best way to go about this?
Thanks,
JasonFebruary 14, 2015 at 3:36 am #396091Maybe something like this except page & portfolio category specific?
February 15, 2015 at 11:22 am #396327Hey!
Thank you for using Enfold.
Yes, you can use that code on functions.php. Use is_page for pages and has_term conditional function for portfolio categories. Refer to these links:
http://codex.wordpress.org/Function_Reference/has_term
http://codex.wordpress.org/Conditional_Tags#A_PAGE_PageBest regards,
IsmaelFebruary 22, 2015 at 11:05 pm #400280This reply has been marked as private.February 23, 2015 at 3:53 pm #400710Hi!
Yes it look good. We will keep the thread open, if anything comes up, feel free to post here : )
Best regards,
YigitMarch 10, 2015 at 5:05 am #408598Hi Yigit,
The page’s code works, but there must be something up with my portfolio category code (I end up with a bank screen).
Any ideas?
Jas- This reply was modified 9 years, 8 months ago by Jason.
March 10, 2015 at 5:15 am #408608This is the portfolio category;
/wp-admin/edit-tags.php?action=edit&taxonomy=portfolio_entries&tag_ID=81&post_type=portfolio
Should I be including the ID somewhere in that code?
The slug is ‘south-canterbury-past-issues’ which I’m guessing is not what I should be using in this instance?- This reply was modified 9 years, 8 months ago by Jason.
March 10, 2015 at 3:45 pm #408883Hey!
Can you post the link to your page where you would like to display a different logo?
Cheers!
YigitMarch 10, 2015 at 10:28 pm #409579This reply has been marked as private.March 11, 2015 at 2:57 pm #409856Hey!
Please use the code as following
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if(is_tax('portfolio_entries','south-canterbury-past-issues') ) { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } return $logo; }
Best regards,
YigitMarch 11, 2015 at 9:40 pm #410128This reply has been marked as private.March 11, 2015 at 11:09 pm #410155Hi!
I have added the code to Functions.php file of your child theme. Please review your website now
Best regards,
YigitMarch 11, 2015 at 11:13 pm #410165Thanks Yigit,
That has sorted it, many, many thanks!
JasMarch 11, 2015 at 11:15 pm #410168 -
AuthorPosts
- The topic ‘Different header logo on some pages only’ is closed to new replies.