- This topic has 30 replies, 3 voices, and was last updated 6 years, 9 months ago by Tom.
-
AuthorPosts
-
June 30, 2017 at 11:36 am #342122David
Hi Tom and Leo,
I want to use the filter below for posts but I don’t want it to filter the homepage.
add_filter( 'generate_sections_sidebars','__return_true' );
What is the best way to do this? Thanks!
June 30, 2017 at 12:01 pm #342136LeoStaffCustomer SupportHi there,
Give this a shot:
add_filter( 'generate_sections_sidebars','lh_generate_sections_sidebars' ); function lh_generate_sections_sidebars() { if ( is_front_page() ) { return false; } return true; }
If your home page is the blog page then try
is_home()
insteadLet me know.
June 30, 2017 at 1:33 pm #342172DavidExcellent. That worked great but the page header content is not appearing.
You can review here:
http://cmcwebdev.com/ilm/00001jf-jonathan-franks/Thanks!
June 30, 2017 at 2:15 pm #342204LeoStaffCustomer SupportThat’s weird. Not sure why it would do that.
I was able to use the code and get the page header show up in post as well.
So there is content in the page header metabox of that post and when you remove/deactivate the code it comes back again?
Just want to make sure nothing is disabled here as well: https://docs.generatepress.com/article/disable-elements-overview/
June 30, 2017 at 6:04 pm #342260DavidChecking now. Yeah, it’s very weird. One moment.
June 30, 2017 at 6:21 pm #342270DavidStatus Update
Disabled Elements = nothing is checked there.I created a new Post and the same result. Page header is not appearing.
Hmmmmmmm?
June 30, 2017 at 7:51 pm #342280LeoStaffCustomer SupportAnd as soon as you deactivate the snippet the page header displays again?
June 30, 2017 at 8:08 pm #342284DavidDeactivated the snippet and the page header doesn’t display again.
June 30, 2017 at 8:13 pm #342285LeoStaffCustomer SupportHmm I really think this is causing by something else…
Just tested it a couple times and couldn’t reproduce the issue.
What do you have in the page header meta box? I can’t see it being loaded in the source code either.
June 30, 2017 at 8:26 pm #342286DavidHere is what I have in the content area:
<p><img src="http://cmcwebdev.com/ilm/wp-content/uploads/2017/06/profile-picture-150x150.jpg" alt="" width="150" height="150" class="aligncenter size-thumbnail wp-image-405 round-image" /></p> <p style="text-align: center;"><strong>Jonathan Franks</strong><br> 1/10/1957 - 6/19/2015<br> Atlanta, Georgia</p> <div style="text-align: center;"><a class="button small">Donate</a> <a class="button small">Send Flowers</a></div>
I did another test by selecting “Advanced” and the Page Header appears. You can review it here:
http://cmcwebdev.com/ilm/00001jf-jonathan-franks/June 30, 2017 at 11:27 pm #342322TomLead DeveloperLead DeveloperI’m seeing the page header content there – is it not working on a different page?
July 1, 2017 at 8:07 am #342457DavidI just created this test page for review. Still not showing up.
http://cmcwebdev.com/ilm/test-post/
I have done these task to troubleshoot:
1. Removed Customize CSS. No Change.
2. Created a new post with content. No Change.
3. Disabled “Disable Elements”. No Change.
4. Deactivated and Reactivate Page Headers. No Change.
5. Deactivated and Reactivate Sections. No Change.
6. Disabled the snippet. No Change.This one has me stumped. Since the Page Header was working prior to adding the snippet for the side bars to appear in Sections.
July 1, 2017 at 9:57 am #342497DavidQuick question. If I switch the Theme to the default WordPress Theme, will I lose my Customizer settings?
July 1, 2017 at 10:05 am #342501LeoStaffCustomer SupportNope you won’t!
July 1, 2017 at 10:11 am #342507DavidTesting that next. Stay tuned.
-
AuthorPosts
- You must be logged in to reply to this topic.