Blog page template to show posts form a certain category

This feature needs a child theme to be installed.
If you are not using any child theme please install and activate the wplmsblankchildtheme  given in the package .

1. Now to add this feature please upload the blog-category.php file provided in attached blog-category.zip file in your wp-content/themes/wplmsblankchildtheme folder .
2. Then add the given code in your wplms-customizer.php file in wplms customizer plugin :

add_filter('wplms_page_metabox','add_category_select');
function add_category_select($settings){
  $settings['vibe_blog_post_category']= array( // Single checkbox
      'label' => __('Blog post category','vibe-customtypes'), // <label>
      'desc'  => __('Fro page template Blog category only ','vibe-customtypes'), // description
      'id'  => 'vibe_blog_post_category', // field id and name
      'type'  => 'text', // type of field
          'std'   => ''
      );
  return $settings;

}

this will add a setting in each page to put the category slug .
There you can put the category in text field which you want to show and select the page template to be Blog category .

refer : http://prntscr.com/bqpxqr

Leave a Reply

Your email address will not be published. Required fields are marked *