Thread Starter
smoo
(@smoo)
Update:
Have discovered that if I enable ‘Promotion Title Display’ and ‘Display Fancy Title’ in ‘Promotion Slider Options’ then the title links to the url I’ve specified, but the image itself still links to a promotions page.
I then tried checking ‘Disable all links for this promotion’ and it appears to have no effect at all, the image still links to a promotion page.
It seems like this plugin is great in so many ways, -so am I missing something?
Thanks for any help
Thread Starter
smoo
(@smoo)
Just to be clear: I don’t want to use the promotions pages at all; I’d just like the images in the slider to link to different sections of my site.
Thanks again!
I tested out the issue you described and was unable to duplicate the problem on my end. Have you added any custom filters?
Thread Starter
smoo
(@smoo)
Bingo!
I’m using several custom filters, but it turns out that it’s the one posted here: http://wordpress.org/support/topic/making-post-thumbnail-link-to-post?replies=13
with the comment “// THIS LINKS THE THUMBNAIL TO THE POST PERMALINK”
which is causing the conflict.
I’d really like my thumbnails to link to their respective articles as well as use your great slider (I know, I want it all!) but am relatively new to working with filters. In your opinion, do you think there may be a way around this? Or is the way that each of these work mutually exclusive?
Thanks for your time
If you are using that filter to link your post thumbnails to your posts, but don’t want to apply that to your slider images, you just need to do a post type check in your filter.
Use the get_post_type() function to do the check.
For example:
add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );
function my_post_image_html( $html, $post_id, $post_image_id ) {
if( get_post_type($post_id) != 'ps_promotion' ){
$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';
}
return $html;
}
Thread Starter
smoo
(@smoo)
Praise be!
Thank you so much for your time, it’s very much appreciated.
Also great to be slowly getting to understand WP’s general awesomness :o)
This is kind of related. The “Continue Reading” link that is displayed when an excerpt is used links to the promotion link, not the custom URL. In the end it goes to the custom URL, but I would like it to be consistent. Any thoughts?
You will want to customize the excerpt_more filter to change the “Continue Reading” link in TwentyTen.