Print

Creating Custom Articles

In this article we will demonstrate how to customize your Articles if you need to fully customize the content and KB configuration is not sufficient for your requirements.

You can customize your articles using either:

    a)  Child Theme
    b)  Article hooks

Both options are described below.

When using Child Theme option to customize your article, choose one of two template options in the visual Editor:

  1. Current Theme
  2. Knowledge Base Theme

To learn more about that click here.

 

a) Current Theme

  1. This is your themes folder in this example you should have both:
    1. hello-elementor
    2. hello-elementor-child-theme
  2. This is the hello-elementor-child theme
  3. This is the template parts folder
  4. This is the single.php file, this is the file you will need to customize your article.

Ensure that you have “kb-templates” folder in your child theme as shown in the example.

Now if your theme has a different Template Hierarchy structure then single.php might not be the correct file name and you will need to copy your themes PHP as well for that file.

Output example.

We have added text and highlighted it in yellow so you can see the custom HTML and custom CSS being applied to the template.

b) Knowledge Base Theme

  1. This is your themes folder in this example you should have both:
    1. hello-elementor
    2. hello-elementor-child-theme
  2. This is the hello-elementor-child theme
  3. This is the kb_templates folder
  4. This is the single-article.php file, this is the file you will need to customize your article.

 

Output example.

We have added text and highlighted it in yellow so you can see the custom HTML and custom CSS being applied to the template.

Using WordPress Hooks

If you want to hook within the KB template output like the sidebar or under the title. See this article here.

Was this article helpful?
4.5 out Of 5 Stars

1 rating

5 Stars 0%
4 Stars 100%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?
Table of Contents