Site logo

Archived topic

Basepress and GP Premium

13 replies · Started by Luke on May 29, 2022

Viewing posts 1–14 of 14

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,
Luke

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.

Sorry about that, Fernando - please try again, you should be able to see the URLs now.

Regards,
Luke

Hi there,

what happens if you add this CSS:

body[class*='knowledgebase'] .site-content {
    display: block;
}

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.

In the Display Rule locations is there something like: Knowledge Base Article Archive - its the archive parts thats important as that will need excluding.

I'm afraid not David.

The only two are;

Knowledge Base Article

Knowledge Base Article category

Regards

Hmmm... 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 123 needs to be changed to the ID of the Element.
And the CPT_SLUG needs to be change the the knowledgebase CTP slug.

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.

Its odd, but the plugin isn't using static page templates - they are output as an Archive - you can see it in the body classes 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 ?

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.

So if you remove the Entire Site rule, and just set the Location to: Pages, Blog and Posts. Does it ignore the BasePress pages ?

It seems to be working great now, David ;)

Thanks for your patience today. Great support as always :)

You're welcome - glad to be of help!

This archived topic is closed to new replies.