BasePress
Forum Replies Created
-
Thanks @bouncingsprout,
really appreciated you sharing your opinion!
Hi @sachsongngu,
That’s great to hear!
Thanks for sharing your finding. It will definitely be helpful to other people!Hi,
That seems to be an issue with Yoast SEO.
Please try this:
1. Go to the edit screen for your article.
2. Scroll down to Yoast SEO fields
3. In Snippet Preview click on Edit snippet
4. In the SEO Title add%knowledgebase_cat%You will notice that as soon as you start typing it will suggest the taxonomy for you to choose. This works in the frontend just fine.
If you do it from Yoast Search Appearance it doesn’t even suggests the taxonomy and it doesn’t work in the frontend.
I am not able to tell you why it wouldn’t work from there but The Yoast team should be able to help with this.Thanks
Hi,
I have tested Yoast SEO and I can confirm that it does override what the code does.
That said you can use Yoast SEO Title without issues. In the title field for the article just type%knowledgebase_cat%. That will do what you need without using the extra code.To use Yoast for your KB archive pages:
Visit Knowledge Base > Manage KBs and click in the edit icon that appears when hovering the KB. In the edit panel that opens scroll to the bottom and click on “View more”. From there you can set the SEO fields for the KB.For the sections do the same but from Knowledge Base > Sections.
Thanks
Hi,
can you please tell me if you are using any other plugin that may also set the post title? Like a SEO plugin for example? If you are using a SEO plugin that could already be done from that plugin and avoid the extra code.
Also does that article have a sectioned assigned already? If the article has no section the code would not change the title.
Thanks
Hi @sachsongngu,
that error happens because that the same code has been added to two files.
Please remove it from:
wp-content/plugins/basepress/themes/modern/functions.php:124and just add it to:
wp-content/themes/journalist-feedly/functions.phpThat should do it.
Hi @sachsongngu,
Thanks for clarifying!
You can change the title as you need by adding the following code to your theme’s functions.php:function set_kb_articles_titles( $parts ){ global $post; if( is_singular( 'knowledgebase') ){ $section = get_the_terms( $post, 'knowledgebase_cat' ); if( ! empty( $section ) && ! is_wp_error( $section ) ){ if( isset( $section[0]->name ) ){ $parts['title'] .= ' ' . $section[0]->name; } } } return $parts; } add_filter( 'document_title_parts', 'set_kb_articles_titles' );Thanks
Hi @sachsongngu,
Can you please tell me if you mean the post title in the widget or the post title when viewing an articles page?
Thanks
Hi @sachsongngu,
I am happy you like BasePress!
To change the widget text you can visit WordPress menu Appearance > Widgets then open the Knowledge Base Sidebar. There you will see a widget for Related Articles. You can change the title from there.
You can also find more widgets to use in your Knowledge Base.Thanks
Version 2.7.3 has been released with a fix for this issue.
Thanks @nightingale323f for your help in debugging this!
Hi @micahjsharp,
we haven’t heard from you yet so I was wondering if you managed to get the pages to appear?
Thanks
Hi @nimrod54,
Thanks for your kind review!
Forum: Plugins
In reply to: [Knowledge Base documentation & wiki plugin - BasePress Docs] Article orderHi there,
I am not sure why Dreamweaver would mark any of that code in red but I can reassure you that there are no errors.
Thanks
Forum: Plugins
In reply to: [Knowledge Base documentation & wiki plugin - BasePress Docs] Article orderHi @moonyell,
the articles are displayed by date in ascending order.
You can change that by adding the following hooks to your functions.php://Change post order for a single section page add_action( 'pre_get_posts', function( $query ){ global $basepress_utils; if( $basepress_utils->is_section){ $query->set( 'order', 'DESC' ); } }, 9999 ); //Change post order for multiple sections page add_filter( 'basepress_multi_section_query', function( $args ){ $args['order'] = 'DESC'; return $args; } );In case you need the Premium version allows you to reorder the results manually with drag & drop.
Thanks