- This topic has 25 replies, 3 voices, and was last updated 6 years, 5 months ago by Tom.
-
AuthorPosts
-
September 28, 2017 at 12:12 am #393327TomLead DeveloperLead Developer
You’re still using GP Premium 1.2.90: https://docs.generatepress.com/article/updating-gp-premium/
November 14, 2017 at 6:38 am #423991BobbyHello Tom,
I ran into a problem since updating to your newest update.
After updating to GPP 1.4.3, everything was working just fine….the logo changed for the specific category and the main logo remained the same on the homepage. Well, yesterday, after updating to Version 1.5.2, the logo on the main homepage switched to the category logo. I removed the code for the category logo and the main logo re-appeared back to normal… it looks like the code you provided me is no longer working since i updated to version 1.5.2.
Here’s the code im using below:
add_filter( 'generate_navigation_logo', 'tu_category_logo' ); function tu_category_logo() { if ( is_category( '3702' ) || in_category( '3702' ) ) { return 'http://theballerlife.com/wp-content/uploads/2017/09/baller-wives-life.png'; } return 'http://theballerlife.com/wp-content/uploads/2016/12/blife1.png'; }
Thanks.
November 14, 2017 at 8:11 am #424157LeoStaffCustomer SupportHmm that code should still work.
Can you add the code back in and link us to the page that isn’t working?
Thanks!
November 14, 2017 at 8:55 am #424192BobbyHi,
I just put the code back in and the logo on the homepage switch to the category logo. When i take the code out, the original logo re-appears and the category logo disappears.
November 14, 2017 at 9:45 am #424250TomLead DeveloperLead DeveloperMaybe try this:
add_filter( 'generate_navigation_logo', 'tu_category_logo' ); function tu_category_logo( $logo ) { if ( is_category( '3702' ) ) { return 'http://theballerlife.com/wp-content/uploads/2017/09/baller-wives-life.png'; } return $logo; }
November 14, 2017 at 2:56 pm #424429BobbyHello Tom,
It works but not like the other code. The code you gave me changes the logo on the specified category, but when a person clicks “read more” to go to the story, the logo switches back to the main logo. The other code covered all the logo changes. I tried the original code and just changed the “return” to $logo;…but that did not work.
Any suggestions? Thanks.
November 14, 2017 at 3:11 pm #424442TomLead DeveloperLead DeveloperThat code doesn’t cover being inside categories.
For that, you’d need to do this:
add_filter( 'generate_navigation_logo', 'tu_category_logo' ); function tu_category_logo( $logo ) { if ( is_category( '3702' ) || in_category( '3702' ) ) { return 'http://theballerlife.com/wp-content/uploads/2017/09/baller-wives-life.png'; } return $logo; }
November 14, 2017 at 4:20 pm #424485BobbyHi Tom,
Yes, this is the code i tried and it changed the homepage logo back to the category logo. Strange??? Before I updated to the newest version 1.5.2…the prior code worked for everything. Hmmm….Should I go back to the last version??
November 14, 2017 at 4:30 pm #424489TomLead DeveloperLead DeveloperDefinitely not. Try this instead:
add_filter( 'generate_navigation_logo', 'tu_category_logo' ); function tu_category_logo( $logo ) { if ( is_category( 'test-cat' ) || ( in_category( 'test-cat' ) && is_singular() ) ) { return 'http://theballerlife.com/wp-content/uploads/2017/09/baller-wives-life.png'; } return $logo; }
Just confirmed that it’s working ๐
November 14, 2017 at 5:15 pm #424511BobbyPerfect!!! It’s working again! Thanks for all your help.
Take care.
November 14, 2017 at 5:16 pm #424513TomLead DeveloperLead DeveloperYou’re welcome ๐
-
AuthorPosts
- You must be logged in to reply to this topic.