which plugin are you referring to? That would be a good starter
Hi,
The plugin I am referring to is this one:
https://wordpress.org/plugins/bbpress-topic-thumbnails/
The issue is that this one only pulls the thumbnail from the first image in the post. I want a default image to be used for all posts regardless so that the branding of the site remains consistent.
There must be a way to do this through PHP, just I do not know where to start (and I have a limited knowledge of PHP).
Cheers
Ok, I cracked that code open, and think that putting in the following will work
add_action( 'bbp_theme_before_topic_title', 'assylumn_insert_thumbnail' );
function assylumn_insert_thumbnail() {
echo('<a href="http://www.mysite.com/wp-content/uploads/2013/09/picture.jpg">') ;
echo('<img class="bbp-topic-thumbnail" width="100%" style="max-width: ' . get_option('thumbnail_size_w') . 'px; max-height: ' . get_option('thumbnail_size_h'). 'px; vertical-align:middle;" src="http://www.mysite.com/wp-content/uploads/2013/09/picture.jpg"/>' .'</a>');
}
Obviously you’ll need to change the URL to your image
You’ll need to add this to your functions file, if you don’t know how to do this, come back !
Thank you for your swift response!
I assume you mean the functions.php file within my template? If so, is there any particular point that I should insert the function?
I have a site to deploy tomorrow so will look at this after I have done that and report back.
Thanks again
Yes, No particular point that you should insert it – I’d put it at the end.
Hi Robin,
That has worked but with a small issue….the image is displaying far bigger than the uploaded file which is 75x75px. What do I need to change in that code to help the formatting?
http://techdev.kemikalkitchen.co.uk/forums/forum/android/
This is on my test server but is the same environment that the final site will reside in.
Many thanks
Got it!
Reduced the width from 100% to 25% and now it looks good.
You sir, are a Gentleman!
Many thanks for the assist!
Great, glad it all worked !
If you’re not using a child theme, then any theme upgrade may overwrite your functions file, so keep a note of the final code you used, as you may need to add it back.