To have a ShortCode attribute process_category
, where you can pass the Slug of your Process Category, so you can create WorkFlows that output only those Processes under that specific Term, you can edit process_shortcode.php
line 25
and add (below it) a new $attribute
:
$attribute = shortcode_atts(array(
'type'=>'',
'animation'=>'',
'show-posts'=>'',
'steps-in-row'=>6,
'process_category'=>'',
), $atts);
Then on line 55
change the $args
to this:
$args = array(
'post_type' => 'process_posts',
'post_status'=>array('publish'),
'orderby'=>'meta_value_num',
'order'=>'ASC',
'meta_key'=>'pp_post_order',
'tax_query' => array(
array(
'taxonomy' => 'process-categories',
'field' => 'slug',
'terms' => $atts['process_category'],
),
),
);
Now you can insert the shortcode as this:
[cool-process type="with-number" process_category="some" steps-in-row="2" show-posts="3"]
This will display only those processes in term some
of taxonomy process-categories
Small hack that works great.
-
This reply was modified 7 years, 7 months ago by Anonymous User 14808221.