Forum Replies Created
-
AuthorPosts
-
July 28, 2015 at 7:19 pm in reply to: Add Custom Background to Nav Bar in LifestylePro Theme #160815ShanGMember
That worked, thank you. I don't get why I couldn't just load it via the images folder like all the other images. Weird.
June 20, 2014 at 3:31 am in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #110753ShanGMemberAnd this will definitely make the header show on individual posts from that category as well as the category archive page, correct? I just don't want to spend time on another thing that won't work. lol
June 20, 2014 at 2:19 am in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #110747ShanGMemberThank you! I will look at it with fresh eyes in the morning. At the moment I can't keep them open. Damn bifocals! lol
This is for the Quattro theme. The main header CSS is already in there and working fine.
http://skeweddesignstudios.com/thisisatest/category/gin-joint/
Is it better to use that category slug or ID for this?
June 20, 2014 at 1:46 am in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #110744ShanGMemberLike this?
function specific_header_image(){ if(is_home()) echo '<div class="cl-header"><img src="http://example.com/path/to/image.png" alt="cl header image" /></div>'; elseif (in_category(‘gin-joint’)) echo '<div class="gin-joint-header"><img src="http://example.com/path/to/image.png" alt="gin joint header image" /></div>'; } add_action('genesis_header', 'specific_header_image');
Now all other categories, pages, posts, EXCEPT "gin-joint" need to have the same header. According to this code, the main site header will only display on the HOME page and nowhere else, which is not what I want. Or do I have that wrong?
June 20, 2014 at 1:37 am in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #110743ShanGMemberYour site. lol
Displaying A Different Header Image On Homepage Than Other Pages
Do I need to add CSS too for this to work properly? Everything about the header will be the same as the main site header except the image itself.
June 20, 2014 at 1:25 am in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #110738ShanGMemberHow would I modify this for a specific category and will the header display for all the expanded posts and the archive page of the category using this code?
function specific_header_image(){ if(is_home()) echo '<div class="home-header"><img src="http://example.com/path/to/image.png" alt="home header image" /></div>'; elseif(is_page() ) echo '<div class="page-header"><img src="http://example.com/path/to/image.png" alt="page header image" /></div>'; } add_action('genesis_header', 'specific_header_image');
Would this work? And how do I specify which category I want in this code?
function specific_header_image(){ if(is_home()) echo '<div class="home-header"><img src="http://example.com/path/to/image.png" alt="home header image" /></div>'; elseif(is_category() ) echo '<div class="page-header"><img src="http://example.com/path/to/image.png" alt="page header image" /></div>'; } add_action('genesis_header', 'specific_header_image');
June 20, 2014 at 1:07 am in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #110736ShanGMemberI think PHP would be best, right? And it's just one single header for one particular category and all the expanded posts in that category.
June 19, 2014 at 9:17 pm in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #110715ShanGMemberCan anyone help me? I am not a coder, but I can follow a tutorial very well. The code that was offered in this thread does not work.
June 14, 2014 at 11:35 pm in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #109836ShanGMemberOk, I put the amended code in and no syntax error, but no custom header for the Gin Joint category or expanded posts. What did I do wrong? Is there anywhere else I need to edit any code? The header should have the same CSS as the default header, just a different image for that particular category and posts.
This is the last hurdle to finishing this design. I need to get it done, finally.
http://skeweddesignstudios.com/thisisatest/
June 14, 2014 at 10:34 pm in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #109831ShanGMemberThe code did not work. This is what I used and put at the bottom of the functions.php file:
// Enable Custom Header for Specific Category if ( in_category( 'gin-joint' ) ) { remove__action( 'genesis_header', 'genesis_do_header' ); add_action( 'genesis_header', 'cl_do_header' ); } function cl_do_header() { <img src="/quattro-Zippy/images/CL_Gin_Joint_Header.png" alt="Gin Joint" /> }
I got a syntax error. Uggh. Please, anyone, can you help me?
June 14, 2014 at 4:48 am in reply to: How To Add Custom Header For Specific Category And Posts In Quattro Theme #109689ShanGMemberWill this make the header show on the category page as well as single posts of that category?
Also, wpz_do_header...the only thing I change is the wpz? How will this know where to pull the header from?
And does this all go in functions.php? Do I need to do anything in header.php, index.php, single.php, etc.? I found this tutorial, but it kind of confused me: http://andornagy.com/custom-headers-for-each-category-or-page/
ShanGMemberOk, problem solved. After a database repair/optimization, reinstalling WP updates several times and going through the code with a fine toothed comb and a second pair of eyes, the only thing that worked was a fresh install of WP and re-import of data.
I still have no clue why the default themes worked fine but Genesis did not. Two days, several hours and many tired brain cells later, it's all fixed. I think next time a client has a problem with their site, I'm just going to do a fresh WP install and work backwards. That will save them money and me time. LOL
ShanGMemberThis is what has been done so far without ANY change in the functionality of the menus when a Genesis child theme is active:
- Checked child theme files (already know Genesis was up to date...so only needed to check child theme)
- Checked menu, renamed, added, removed and added items again
- Activated and deactivated plugins
- Deactivated theme and then reactivated
- Reset permalinks... again
- Put through a slug URL sanitization
- Made sure plugins that were installed were up to date and no errors
- Played with some of the widgets containing adverts
- Added a z-index on the navigation menusOh and WP has been updated more than once.
However, when a default WP is active, everything works correctly. This has me COMPLETELY stumped.
I'm trying a DB repair now and then a a fresh install of WP to see if it changes anything. I'm am still convinced it's the child theme but cannot figure out where the issue is.
ShanGMemberI've got no clue what that hack did or didn't do to the core. Or anything else. I did find that she had deleted all the default themes and I had to re-install them. That left me scratching my head and saying those three words I can't type here. 😀
ShanGMember@Susan, yes that's what I'm saying.
I replaced the core Genesis theme with a fresh copy, but have not done so with the child theme because my client can't afford to pay me any more than what I'm already charging. BUT, when I enabled the Fabric theme that I had designed for her previously, I got the same result. This is why I believed it was the core that was the issue.
I'll take a look at the functions.php in the core and child themes to see what I find.
ShanGMemberI cannot say HACK loud enough about this so-called designer. Just sayin'.
ShanGMemberAnother strange thing is that the menu items say "custom" instead of category or page. Even removing them from the menus section in the dashboard and adding them back via the list in the left column, I get the same thing. On my own blog each of my menu items say category or page, though I'm not using Genesis.
Here's a screenshot: http://musingmainiac.com/wp-content/uploads/2013/06/Beth-Menus-Error.png
ShanGMemberI did open a support ticket but have gotten no response yet.
ShanGMemberYes, there is a live site to look at. Wasn't there a link in the first post?
Activating the core itself yields the exact same results...non-working menus and no featured images.
Live site is here: http://musingmainiac.com/
March 19, 2013 at 9:58 pm in reply to: Need Primary Menu & Header Alignment Help Quattro Theme #29586ShanGMemberOk, I sent the info you requested. Thank you again for agreeing to help me. 🙂
-
AuthorPosts