better
asked 7 years ago

Hi,
I’m using the Knowledge Base plugin and I would like to edit the templates to add some custom content into them. How can I do this? Does it work like the Question & Answers plugin where I can create a folder in my theme and override the templates?
Thanks.

2 Answers
DominicStaff
answered 7 years ago

As I wrote here: https://www.designwall.com/question/change-page-template/
Please let me know detail about your section, position and content, that you want to show in the page, I will check and help you.

better
replied 7 years ago

I need to change the design/layout slightly and add some more links and custom content, can I not just do this myself?

Dominic Staff
replied 7 years ago

You can do it but you need let me know detail the section and what do you want to change? I will check and send the best solution.

better
replied 7 years ago

I want to change the default page using ‘theme 6’ to include a link on the category image. I then want the category list page to not show the ‘[…]’ but instead a button, I’d also like to add a custom class to the title of each question on this page and re-order the content on the page where the full article is displayed.

DominicStaff
answered 7 years ago

If you want to add the link to the category thumbnail, you can open the index-dwkb-6.php file then find the code line 42 and replace it with the following code:

<div class="category-thumbnail">
<a href="<?php echo $term_link; ?>">
<img src="<?php echo $term_thumb; ?>" alt="<?php echo $term_name; ?>" class="category-image" /></a>
</div>

To show button instead […], you can add the following code to the dw-knowlegebase.php file.

function new_excerpt_more($more) {
global $post;
return $more . '<a href="'. get_permalink( $post->ID ). '" class="readmore">more</a>';
}
add_filter('the_excerpt', 'new_excerpt_more');

Then add the following code to the style.css file.

.dwkb-archive-with-excerpt .kb-article a.readmore {
    background: #ddd;
   padding: 4px 12px;
   border-radius: 2px;
}

If you want to  add a custom class to the title of each question, you can find the line 32 of the archive-dwkb.php file.
About this question ” re-order the content on the page where the full article is displayed.” Please let me know detail about it.

Powered by DW Question & Answer Pro