• Hi,

    I wish to switch to your Knowledge Base Plugin from a previous plugin which is no longer active or updated, support for newer PHP versions and has security issues.

    My question is: Is there a easy way to merge or import the articles or would I need to start over? Theme support shouldn’t be an issue as I use a basic theme (twentytwelve). It’s just the articles.

    Cheers

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Ajay

    (@ajay)

    Sorry for the delay @davidblood. I need to see how the plugin functioned behind the scenes.

    In case you’re aware, if this was a custom post type per article, I believe it could be possible to switch the post type after you activate my plugin with a post type switcher plugin.

    It might need some retagging but then you’d be good to go.

    Thread Starter davidblood

    (@davidblood)

    Hi, sorry for the late reply never got around to switch due to time. However, I got some free time now so looking into getting this updated.

    It seems its using a custom post_type of kbe_knowledgebase from the _posts table.

    https://plugins.trac.wordpress.org/browser/wp-knowledgebase/tags/1.3.0

    • This reply was modified 2 months ago by davidblood.
    Plugin Author Ajay

    (@ajay)

    I think, if that is the case, the switch should be relatively easy, since my plugin uses the post type wz_knowledgebase. I believe you could use a post type switcher like https://wordpress.org/plugins/post-type-switcher/ to change the post type after you activate my plugin.

    I’m currently working on a new free version and launching a pro version as well, which supports a better interface for multiple products.

    I am not sure how easy it is to change post tags/categories, but I believe it can be done.

    Obviously, please do try this on a staging site first.

    Thread Starter davidblood

    (@davidblood)

    Hi,

    So with the help of Claude Opus 4.5 I was able to do this via SQL using the “URL” part to see what each plugin used. For example for tags it seems the old plugin used:

    /wp-admin/edit-tags.php?taxonomy=kbe_tags&post_type=kbe_knowledgebase
    Yours:
    /wp-admin/edit-tags.php?taxonomy=wzkb_tag&post_type=wz_knowledgebase

    UPDATE wp_term_taxonomy SET taxonomy = 'wzkb_category' WHERE taxonomy = 'kbe_taxonomy';
    UPDATE wp_posts SET post_type = 'wz_knowledgebase' WHERE post_type = 'kbe_knowledgebase'
    UPDATE wp_term_taxonomy SET taxonomy = 'wzkb_tag' WHERE taxonomy = 'kbe_tags';

    No clue if I missed anything, think article, tags and category is pretty much it.

    Total time: 615 rows affected. (Query took 0.0120 seconds.)

    So far, so good! This was all done on a staging sub-domain, of course.

    My only issue currently is I don’t like the categories using the full width makes the index home page very log. I preferred the side by side (2 wide) guess I could tweak the code and modify it – secondly, all the article text is small, compact close together so guess I need custom CSS here.

    • This reply was modified 2 months ago by davidblood.
    • This reply was modified 2 months ago by davidblood.
    Plugin Author Ajay

    (@ajay)

    This all looks sensible to me.

    I just realised you updated your previous message so I guess it’s working better now?

    Can you set the number of columns in the settings page for the current view that you have – it should allow you to do 2 side by side (or more if you prefer).

    The new free will have an additional and better style (at least my view) in addition to this which I’m calling legacy. The pro has several more.

    Thread Starter davidblood

    (@davidblood)

    Hi,

    Yeah, I edited my message I got some of it working! I had to use the Block as the shortcode [knowledgebase] didn’t work – It’s now just the columns and style.

    I have tried setting it to “2” or “3” and it doesn’t change anything.

    Number of columns > 3
    Inbuilt styles: checked (set in the sidebar and settings)

    Edit: I just noticed when using the Knowledge Base block and on the right hand sidebar setting “max articles per section” or “number of columns” here when you save > reload it doesn’t save the value? It’s empty again. The “show excerpt” seems to save unless it doesn’t display the saved/stored value but it’s stored in db (reading it). Anyhow, setting to “3” here or Settings => Styles still shows 1 column.

    For example (look how small and compact text is): https://ibb.co/B2cXdrwx both Twenty Twelve.

    I also can’t see a way to “order” and change the default sorting is this purely A-Z? For example the outdated plugin had the order.php page which allowed “Drag and drop items to customise the order of categories in WP Knowledgebase” or is this a Pro feature?

    Edit 2: Righto, I understand it more now! It seems the setting I was looking for was First section level to 1 not 2 (default) here is a side by side: https://ibb.co/C3PF4yFZ

    Seems to be pretty close to the previous plugin. Just the article UI to work on now and figure out why it ads “Archives March 2022” and “Categories Uncategorised” at the bottom.

    • This reply was modified 2 months ago by davidblood.
    • This reply was modified 2 months ago by davidblood.
    Plugin Author Ajay

    (@ajay)

    Glad to see you’re shaping this up. The new version separates Products from Sections, so it’s a bit more intuitive vs what we have currently.

    I do not understand why the shortcode is failing when the block is working fine. One option is to configure the KB permalinks (slug) in the Settings page.

    Since you’re working through a staging site, do let me know if you’re in a position to test https://github.com/WebberZone/knowledgebase/releases/tag/3.0.0-beta2

    This is a very, very advanced release. I have a bit of testing left to do but I’ve ironed out all the bugs I could find so far.

    Thread Starter davidblood

    (@davidblood)

    Hi,

    Thanks! This is a the site in question replacing the previous. Just trying to make the match and mimic as much as possible.

    I saw on your GitHub about using the Intuitive Custom Post Order and that seems to work perfectly. Slightly annoying needing another Plugin but hey-ho!

    Regarding 3.0.0-beta2 is that simply the case of downloading and uploading to the knowledgebase plugin folder over writing existing files? Nothing else needs to be done manually? Basically the same as updating a plugin normally I guess.

    Plugin Author Ajay

    (@ajay)

    Fully agree on needing another file. This isn’t in v3 yet, but it will be part of the pro plugin. I’ve spent ridiculous amounts of time on that.

    On 3-beta2, yes you can download it from there. Go to Plugins > Add New and upload the file. It should ask you to overwrite the current installation.

    You will need to run the migration wizard if you enable multi-product mode to migrate your existing setup to the new one. I highly recommend this. Please do backup the staging site before migrating. There is a dry-run which tells you what all is being migrated.

    Alternatively, if you’re happy with the current system, keep Multiproduct off and everything should run as normal – but with the latest codebase.

    https://webberzone.com/support/knowledgebase/migration-guide-knowledge-base-v2-3-to-v3-0/

    Also: https://webberzone.com/support/product/knowledgebase/

    Note that it’s still using my older version. But, I’m planning to migrate my own KB to the 3.0.0 beta – it’s currently on my local site with quite a bit of extensive testing.

    Thread Starter davidblood

    (@davidblood)

    Hi,

    So, I have updated to 3-beta2. However, the multi product way didn’t work out well for me feel it’s not for my use case so revert database and re-did my steps leaving multiproduct off this time, perfect!

    However, a few questions!

    1. The custom CSS headers are not longer being applied I updated the CSS selectors (example wzkb_section_name → wzkb-section-name) as per the GitHub. However, they aren’t being applied? It seems the CSS in the field (Knowledge Base => Settings => Styles => Custom CSS) isn’t being loaded viewing the website source only related CSS I can find is: /wp-content/plugins/knowledgebase/includes/frontend/css/styles/classic.min.css?ver=3.0.0-beta2 there is no <style> sections – Is this only loaded when using Legacy now?
      Edit: Ignore, it seems using the shortcode it didn’t apply this. Switched to Block – Worked.
    2. Is it possible to have the breadcrumb above the search bar and show on every page (inc front)? No breadcrumb then going to an article with a breadcrumb ruins the flow. I would also like search on the homepage / front page. I had this in my header.php child theme but if I add it now it duplicates. On the Topic page the breadcrumb being down below the title ruins the flow too (imo) – By flow I mean it’s not fluid and like no consistency across pages.
      Homepage: it isn’t there – Article page: it’s wedged down below searchbar – Topic page: it’s moved again below the topic title.
      EDIT: It seems I have managed to do this for category page by modifying the taxonomy-wzkb_category.phpfile: https://pastebin.com/iispYjqc. Assume this will be the same for single-wz_knowledgebase.php Still not sure how to add search and breadcrumb to front page.

    EDIT 2: Okay, so I’m making some good progess. I was able to resolve the issue with spacing it seems my theme (official default WordPress theme) uses entry-content instead of page-content and entry-header instead of page-header.

    Now, I feel I have nearly nailed it 99% just now getting the breadcrumb and search on homepage “/”

    • This reply was modified 2 months ago by davidblood.
    • This reply was modified 2 months ago by davidblood.
    • This reply was modified 2 months ago by davidblood. Reason: Added edit 2, I've resolved most of these issues
    Plugin Author Ajay

    (@ajay)

    1. I need to check the shortcode not applying the Custom CSS as that should apply irrespective of what setting you pick.

    2. I realise your point on the breadcrumbs now that you’ve pointed it out to me! I’ll move the breadcrumb to the very top before the search bar as I think intuitively it’s the best place to be. Will do this across all the templates.

    On templates, I’ve built this based on the twenty-twenty-five theme, and so it might not always work for the HTML of other themes that differ. However, the best point is for you to create a template of the same name within your theme and the plugin will pick that up instead of the theme within the plugin folder.

    Any plugin update will overwrite your edits.

    Lastly, can you please tell me what made you switch back from multi-product to single product? The reason I ask is that I can get both the product and the multi-product views to work for me in the exact same way, but I feel the multi-product is a more common workflow, looking at other plugins.

    Update: I have fixed the shortcode not loading the custom CSS issue – there was a bug. I’ve also updated all the templates to have the breadcrumb before the search box so it’s all consistent now.

    Thread Starter davidblood

    (@davidblood)

    Hi,

    1. Glad you was able to locate the issue and get that fixed! For a moment I thought I was doing something silly but then considered maybe it was for Legacy only.. So I’m glad it’s intended to work for both templates.
    2. Yeah, I feel most sites usually have the breadcrumbs at the highest point just below a navigation bar (if any) like this support thread (WordPress has Nav > Sub-nav > Breadcrumbs > Search)

      Regarding my template modifications I can confirm these were done in a child theme not the plugin’s files directly – since as you mentioned updates will overwrite any modifications here.

    I’m surprised the twenty-twenty-five didn’t stick with the entry-content since usually WordPress follow and recommend microformat but not to worry, I got it in the end!

    entry-content is a common HTML class/ID used in WordPress themes (instead of a generic page-content) to specifically target the main body of a post or page, allowing for theme-specific styling or manipulation via CSS/PHP functions like the_content() for posts, while page-content might be used more broadly for any container or a different CMS.

    WordPress / classes required by a particular microformat. https://microformats.org/wiki/hentry

    For multi-product for me it was the URL structure changing and would mean I have to update any other pages and breaking links already out in the wild. I’m going to dupe my staging site again (before 3.0.0-beta2) and do a second staging site for multi-product and try to show/explain better.

    Maybe I just missed something in a rush (as it was 5am..) or did something wrong but I will definitely revisit here.

    Edit: Is it possible to also override other files/folders? I.e. I need to modify /wp-content/plugins/knowledgebase/includes/frontend/class-breadcrumbs.php but don’t wish to do it here since plugin updates will revert. I tried to copy class-breadcrumbs.php into my Child Theme but didn’t work and also tried to copy it into my Child Theme matching path /wp-content/themes/wp-child/knowledgebase/includes/frontend/class-breadcrumbs.php (which is out I did the previous KB plugin I used) but also didn’t work.

    Reason for modifying: my Knowledgebase is hosted on a sub domain so this creates Home (“/”) => Knowledgebase (“/article”) => “Category Here” => “Article Title Here” so need to comment out // the wzkb_get_kb_url section in class-breadcrumbs.php.

    When I comment out this part it achieves what I’m aiming for – Home > Announcements > Do Not Track or Sell My Information not Home > Knowledgebase > Announcements > Do Not Track or Sell My Information. As for my setup “Home” is the Knowledgebase here.

    • This reply was modified 2 months ago by davidblood. Reason: Added edit regarding breadcrumbs class file
    Thread Starter davidblood

    (@davidblood)

    Howdy,

    Okay, so working on my plan previously trying to add breadcrumb and Search to the front home page. I have managed to get the Search to appear by simply adding the Knowledge Base Search block to the page set as Front Page. However, for breadcrumbs It doesn’t want to appear via a Block (Knowledge Base Breadcrumb) or Shortcode ([kbbreadcrumb separator=" » "]).

    Not sure if this is how you intended it to be or another bug?

    Cheers.

    Plugin Author Ajay

    (@ajay)

    Catching up on the above messages.

    The breadcrumb currently doesn’t show on non-KB pages.

    I modified this file that should detect if it is in the context of a KB – can.you give that a try and let me know if that works for you.

    https://github.com/WebberZone/knowledgebase/blob/develop/includes/frontend/class-breadcrumbs.php

    Thread Starter davidblood

    (@davidblood)

    Hi,

    Perfect! So that updated class-breadcrumbs.php allowed the breadcrumb to appear on the front page now.

    However, It seemed to of added some extra height or padding (other pages are fine) above is the home page (“/”) and below is a random article example, peak the height difference.

    Here is a pastebin.com of the source code rendered for both. However, this isn’t you It’s the theme’s styles.css which is being weird as it’s not happening on article pages despite it’s reading the same styles.css.

    From current research it seems its due to on front page it’s added insideentry-content and on articles it’s added outsidethe entry-content div class before the entry-header post-header class. Assume it’s cause I’m using a WP > Pages > WP Block I’m injecting it into the content area where the plugin injects outside before this – I’ll dig deeper. Thanks it works!

    Edit: Can confirm if I remove the Knowledge Base Breadcrumb Block from the page and instead call it from my child’s header.php it works as normal. So, not a bug just loaded elsewhere.

    <?php if (function_exists('wzkb_breadcrumb')) {
    wzkb_breadcrumb();
    } ?>

    Edit 2: Whoops! That now shows 1 breadcrumb on the front page, two on articles etc – to avoid this I updated to use is_front_page() function.

    <?php if (is_front_page() && function_exists('wzkb_breadcrumb')) {
    wzkb_breadcrumb();
    } ?>
    • This reply was modified 2 months ago by davidblood. Reason: Added edit; work around
    • This reply was modified 2 months ago by davidblood. Reason: Edit 2: is_front_page checks
Viewing 15 replies - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.