Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
July 21, 2015 at 3:38 pm #476564
Best Kriesi,
I want to display the taxonomy and categories in the postslider under the post title. can you help me out?
July 21, 2015 at 5:18 pm #476630Hey ErikHummel!
The area your looking for is line 386 in /enfold/config-templatebuilder/avia-shortcodes/postslider.php.
$output .= !empty($title) ? "<h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>" : '';On the next line you could use this to display the categories.
$categories = get_the_category($the_id); if ( ! empty( $categories ) ) { $output .= '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>'; }Cheers!
Elliott-
This reply was modified 10 years, 3 months ago by
Elliott.
July 22, 2015 at 8:55 am #476915Best Elliot,
Thanks for this fix it worked. Can you also tell me how I can display my tags in the postslider? Just like the categories?
July 22, 2015 at 11:18 am #476971and also I want to display a list of all the categories and tags that are added to the posts. Not just the first one
July 23, 2015 at 2:55 am #477450Hi!
You can replace the code with this:
$taxonomies = get_object_taxonomies(get_post_type($the_id)); $cats = ''; $excluded_taxonomies = apply_filters('avf_exclude_taxonomies', array('post_format'), get_post_type($the_id), $the_id); if(!empty($taxonomies)) { foreach($taxonomies as $taxonomy) { if(!in_array($taxonomy, $excluded_taxonomies)) { $cats .= get_the_term_list($the_id, $taxonomy, '', ', ','').' '; } } } if ( ! empty( $cats ) ) { $output .= $cats; }Best regards,
Ismael -
This reply was modified 10 years, 3 months ago by
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
