- This topic has 13 replies, 3 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
May 29, 2022 at 11:30 pm #2237488
Luke
Hi
I use GP Premium and went to set up a knowledge base on my site, but I am having issues with the way the theme is handling these pages. I am using Basepress plugin.
I have looked at every setting I can think of – can someone take a look and let me know if I am missing something obvious or can offer some advice.
The issue;
Basepress created a page, known by the slug of /kb
You then create knowledge base categories and articles.
The kb page and the categories do not display correctly and I can’t see in GP how to change this. See screenshots and hidden URLs.
On these pages, I am also trying to exclude a merge global header element. I have done this in the usual way by adding the page/categories I want to exclude but it doesn’t appear to be working in this case.
The kb articles display exactly as you’d expect and how I’d like the main kb page and categories to display.
I will be very grateful for any advice you can offer here.
Many thanks,
LukeMay 30, 2022 at 12:19 am #2237531Fernando Customer Support
Hi Luke,
I tried viewing the linked sites in the Private Information field, however, I couldn’t view them. I get redirected to your homepage (or is this the issue you’re referring to?)
Are there any extra steps needed to view these pages?
Kindly let us know.
May 30, 2022 at 12:23 am #2237536Luke
Sorry about that, Fernando – please try again, you should be able to see the URLs now.
Regards,
LukeMay 30, 2022 at 2:31 am #2237692David
StaffCustomer SupportHi there,
what happens if you add this CSS:
body[class*='knowledgebase'] .site-content { display: block; }May 30, 2022 at 2:58 am #2237721Luke
Hi David,
Thanks for getting back to me.
The CSS resolved the alignment issue – thank you so much for this 🙂
The issue with the GP element (Global – page hero) still exists though.
I have added the knowledge base (knowledge base page and categories) in the elements exclusion list but the element still appears.
Many thanks for your support.
May 30, 2022 at 3:22 am #2237756David
StaffCustomer SupportIn the Display Rule locations is there something like:
Knowledge Base Article Archive– its the archive parts thats important as that will need excluding.May 30, 2022 at 3:27 am #2237766Luke
I’m afraid not David.
The only two are;
Knowledge Base ArticleKnowledge Base Article categoryRegards
May 30, 2022 at 3:40 am #2237784David
StaffCustomer SupportHmmm… so it has not archive of its own, so instead you can try this PHP Snippet the elements display to false if viewing that post type:
add_filter( 'generate_element_display', function( $display, $element_id ) { if ( 123 === $element_id && 'CPT_SLUG' === get_post_type() ) { $display = false; } return $display; }, 10, 2 );The
123needs to be changed to the ID of the Element.
And theCPT_SLUGneeds to be change the the knowledgebase CTP slug.May 30, 2022 at 4:18 am #2237831Luke
Thanks for the code snippet, David.
Strangely, it half worked!
It removed the element from the knowledge base categories but not the knowledge base homepage.
Any idea why that would be the case?
I am also confused why this isn’t being removed via the exclusion list as the page now in question is a standard page and is added to the exclusion list.
I do appreciate your help with this, David.
May 30, 2022 at 4:34 am #2237845David
StaffCustomer SupportIts odd, but the plugin isn’t using static page templates – they are output as an Archive – you can see it in the
bodyclasses of the page:https://www.screencast.com/t/04uHV7vtk7
Question – where will the Global Header be used ?
I personally get all itchy when i see an Entire Site display rule and a fast growing list of exclusions.
Is it just for static pages ?May 30, 2022 at 4:50 am #2237858Luke
It is strange, but I appreciate your help in trying to work around it.
I think you are right – perhaps I should rethink the locations/exclusions for the element.
This particular element is used on static pages, the blog and its posts.
May 30, 2022 at 5:24 am #2237894David
StaffCustomer SupportSo if you remove the Entire Site rule, and just set the Location to: Pages, Blog and Posts. Does it ignore the BasePress pages ?
May 30, 2022 at 6:27 am #2237953Luke
It seems to be working great now, David 😉
Thanks for your patience today. Great support as always 🙂
May 30, 2022 at 6:38 am #2237963David
StaffCustomer SupportYou’re welcome – glad to be of help!
-
AuthorPosts
- You must be logged in to reply to this topic.