NiceThemesDocumentation for nicethemes_knowledgebase() function arguments – NiceThemes http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/feed/ Tue, 22 Apr 2025 03:58:07 +0000 http://bbpress.org/?v=2.5.12-6148 en-US http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7207 <![CDATA[Documentation for nicethemes_knowledgebase() function arguments]]> http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7207 Fri, 08 Jul 2016 14:44:28 +0000 tondeuse I would like to know if it is possible to force the nicethemes_knowledgebase() function, when called from a home page template, to display the articles nested under child categories.

There si clearly code in that function that makes the display of subcategories possible, the information I need is how to call the function so that section of the code dealing with contents tagged with subcategories is invoked within the function.

How should the $args[‘parents’] and $args[‘child_of’] arguments be used?

Best regards, thank you so much for your time.

Martin

]]>
http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7208 <![CDATA[Reply To: Documentation for nicethemes_knowledgebase() function arguments]]> http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7208 Fri, 08 Jul 2016 15:12:30 +0000 Juanfra Aldasoro Hi Martin,

Thank you for writing. I hope you are doing well.

If I’m understanding correctly, you want to display the categories child of a certain category on your home page.

To achieve this, you have two options: you can do it via hook or by overriding the template-home.php file in your child theme.

The name of the parameter is “category”.

1) If you do it via hook, you need to include some function like the one I’m linking in your functions.php file: https://gist.github.com/juanfra/9032e2f1aca3d06340c60d69599b6f92

2) If you’re overriding the template in your child theme you will need to copy and paste the original file and for the knowledge base call, you have to add the “category” parameter.



nicethemes_knowledgebase( array(
							'columns'     => 3,
							'category'     => 8, // 8 will be the ID of your category
							'numberposts' => $number_articles,
							'before'      => '
', 'after' => '
' ) );

Best,
Juan.

]]>
http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7211 <![CDATA[Reply To: Documentation for nicethemes_knowledgebase() function arguments]]> http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7211 Fri, 08 Jul 2016 19:46:29 +0000 tondeuse Hello Juan,

Thank you so much for your suggestions, I have resolved under the following ticket, so I think we can close this one : http://nicethemeswp.com/forums/topic/knowledgebase-function-how-to-list-subcategory-items-on-home-page-using-template

See also my resolution in a gist :
View the code on Gist.

Best,

Martin

]]>
http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7213 <![CDATA[Reply To: Documentation for nicethemes_knowledgebase() function arguments]]> http://nicethemeswp.com/forums/topic/documentation-for-nicethemes_knowledgebase-function-arguments/#post-7213 Fri, 08 Jul 2016 20:51:32 +0000 Juanfra Aldasoro Hi Martin,

Thank you very much for your response.

I’ve reviewed the other support ticket and I’ve also replied over there.

Have a good weekend,
Juan.

]]>