Support Forums for LiveMesh Themes & Plugins › Forums › Agile Theme Support › Using Custom Taxonomy
Tagged: custom taxonomy, show_post_snippets
- This topic has 10 replies, 2 voices, and was last updated 7 years, 4 months ago by Raghavendra.
-
AuthorPosts
-
August 13, 2014 at 7:06 pm #8509babaLucasParticipant
I added a custom taxonomy to the portfolio.
I tried to use the [show_post_snippets] to filter by my custom taxonomy since taxonomy is a parameter available. Any suggestions?
Here’s the shortcode:
[show_post_snippets post_type="portfolio" terms="dispositions" taxonomy="contribution" number_of_columns=4 post_count=50 image_size='small' excerpt_count=100 display_text="true" show_excerpt="true" hide_thumbnail="false"]
August 13, 2014 at 7:08 pm #8510babaLucasParticipantThis reply has been marked as private.August 14, 2014 at 1:15 pm #8519RaghavendraModeratorThe theme currently sets the taxonomy for known post types like portfolio and gallery automatically in line number 495 of framework/functions/post-functions.php file. Only for other custom post types, you can set the taxonomy. You can modify (or remove) the line above to specify the taxonomy of your own.
August 14, 2014 at 4:20 pm #8526babaLucasParticipantThat’s great; worked perfectly thank you.
One last question: I copied that file to the same directory in my /agile-child but it doesn’t work. What am I missing there?
August 15, 2014 at 5:35 am #8528RaghavendraModeratorPls override the function mo_get_post_snippets_list($args) in your child theme. You cannot replace the whole file like a template page in the root theme directory.
May 4, 2017 at 3:30 am #26569babaLucasParticipantI’m once again having this issue in version 4.1 of the theme.
Trying to use this shortcode:
[show_post_snippets terms=”acquisition” taxonomy=”contribution” post_type=”portfolio” number_of_columns=4 post_count=8 image_size=’medium’]
May 5, 2017 at 1:35 pm #26580RaghavendraModeratorCan I get a temp access so that I can take a closer look at your change you have in your child theme to make this work? Thank you.
May 5, 2017 at 4:11 pm #26583babaLucasParticipantThis reply has been marked as private.May 9, 2017 at 2:46 pm #26608RaghavendraModeratorThis reply has been marked as private.May 10, 2017 at 11:55 pm #26621babaLucasParticipantThis reply has been marked as private.May 11, 2017 at 5:53 pm #26629RaghavendraModeratorI added this piece of code in your child theme functions.php –
if (!function_exists('mo_get_taxonomy')) { function mo_get_taxonomy($post_type) { $taxonomy = 'category'; if ($post_type == 'portfolio') $taxonomy = 'contribution'; elseif ($post_type == 'gallery_item') $taxonomy = 'gallery_category'; elseif ($post_type == 'post') $taxonomy = 'category'; return $taxonomy; } }
It did not work for some reason. Then I changed the parameter from taxonomy to taxonamy (the earlier versions of the theme had this typo) and things are working due to a backwards compatibility code I had in place to accommodate older versions of the theme. Pls check. I have removed the above code.
-
AuthorPosts
- The forum ‘Agile Theme Support’ is closed to new topics and replies.