coaspe
Forum Replies Created
-
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Display Post Thumbnail stopped workingI meant, my question!**
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Display Post Thumbnail stopped workingIgnore my answer, I finally figured out what was going on. I had to reinstall the plugin as I change the wp editor. so now the featured images is actually getting loaded to the related post!
x
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Display category above Title.You are just amazing ‘amazeballs!
It worked wonders, And you just taught me more of how Php works.
Thanks you so much!
X
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Display category above Title.No worries! Thank you for responding. ??
I tried the code and sadly, that removes the post title with the post category.
I looked through the support and I found this tread :
https://www.ads-software.com/support/topic/display-only-title-and-category-using-shortcode/add_filter( 'related_posts_by_taxonomy_caption', 'rpbt_add_category_to_gallery_caption', 10, 2 ); function rpbt_add_category_to_gallery_caption( $caption, $post ) { $terms = get_the_terms( $post, 'category' ); if ( is_wp_error( $terms ) || ! isset( $terms[0] ) ) { return $caption; } $term = $terms[0]; $cat_link .= '<a href="' . esc_url( get_term_link( $term->term_id, 'category' ) ) . '">' . $term->name . '</a>'; return $caption . ' - ' . $cat_link; }
That’s actually how closed I’ve gotten to what I’m trying to style the plugin to.
I ideally, want the category and title to be separate and not under the same link, so I can style them different. However, maybe that’s not possible and I’m being greedy – If so, sorry!.
What I’m trying to achieve —> https://imgur.com/a/ONtJKLZ
Any thoughts?
Again, thank you !
Appreciate every single help and guidance! x- This reply was modified 5 years, 9 months ago by keesiemeijer. Reason: fix code with backticks
- This reply was modified 5 years, 9 months ago by keesiemeijer. Reason: fix code