› Forums › SNAP – WordPress Plugin Forums › Can we have filter capability for HTAGS and extract?
- This topic has 1 reply, 2 voices, and was last updated 6 years, 12 months ago by NextScripts.com.
- AuthorPosts
- December 27, 2017 at 5:26 pm #558015
1) could we have a filter on %HTAGS% please ?
Currently the code is like:
t = wp_get_object_terms($postID, ‘product_tag’); if ( empty($t) || !is_array($t) ) $t = wp_get_post_tags($postID);
It’s great that it includes product tag but actually I’d want to filter that to include product_category and certain product attributes such as brand.2) excerpts
standard extract generators don’t work with %EXCERPT% – effectively %EXCERPT% is the Raw excerot
This is because SNAP doesn’t allow for the filter, code is currently:
if ($post->post_excerpt!=””) $exrText = nxs_doQTrans($post->post_excerpt); else $exrText= nxs_doQTrans($post->post_content);
$pText = (empty($gOptions[‘brokenCntFilters’]))?apply_filters(‘the_content’, $exrText):$exrText;Instead I would expect the code to be eg:
$exrText = apply_filters(‘get_the_excerpt’, $post->post_excerpt)
if ($exrText) //…as before
Instead SNAP is going straight onto test the content if there is no excerpt, and ‘the_content’ filter is not useful for customising the excerpt as the filtering function won’t know that ‘the_content’ is being called in an extract context..December 28, 2017 at 11:50 am #558020You can get product_category as well as other certain product attributes using:
%HCT-CustomTaxonomyName% – Inserts the list of custom taxonomies associated with the post as hashtags.
More info: https://www.nextscripts.com/snap-features/message-formatting-tags/
- AuthorPosts
- You must be logged in to reply to this topic.