Support » Plugin: Carousel Horizontal Posts Content Slider » Link to Category page from the post
2 years, 9 months ago
Really like the plugin! 🙂
How do you link to each posts category page? So you would click on a read more and it would take you to the main category page instead in addition to the button to take you to each individual post?
I’m glad to hear you like it.
Please, replace the code on line #67 in carousel-horizontal-posts-content-slider.php file in plugin folder with the following.
$the_cat = get_the_category($post->ID);
$category_name = $the_cat->cat_name;
$category_link = get_category_link( $the_cat->cat_ID );
$slider_gallery.= '<br/><span class="chpcs_more"><a href="'.$category_link.'">read more</a></span>';
I hope this helps.
I’d appreciate it, if you could give it a rate.
2 years, 1 month ago
How can i do the same thing in current version? Thanks in advance!