Generate Thumbnails of Category - Wordpress Solution
[Solved] - Generate Thumbnails of Category - Wordpress Solution |
---|
Try following codes |
Hello,
On single post pages we would like to display thumbnails of other posts in the same category. The thumbnail is a custom field value called "thumbnail" which every post has.
In the single post .php is this code:
That calls to "postautothumbsoff.php" in this case since automatic thumbnails are turned off. In "postautothumbsoff.php" the code is the following:
ID, 'luisthumb', $single = true);
if($luisthumb !== '') echo $luisthumb;} ?>
![]() by what the output on a category php? and is category php has this loop insided? Thank you for your quick reply. I tried what you said and go the following error on the front-end: Parse error: syntax error, unexpected T_IF in /home/piersru1/public_html/blog/wp-content/themes/grace/includes/postautothumbsoff.php on line 21 Regarding your questions: i have no answer because i am too ignorant of php. If I understand correctly its concerning my category php. Here is the category php code: Does that help? let me check the category.php meanwhile check the code at main answer witch relates to the (after var dumpsemicollon).i think you have cpy my code with error before i had change it. btw. autothumbsoff.php and postautothumbsoff.php is the same file. I just duplicated it to be able to change the thumbnail generation on the single posts and the archives seperately. I tried your code again and this time it showed the thumbnail as before but put this line directly above the thumbnail: thank you for your help! And its show you this code only on single.php only? yes. your latest code is online now. http://piersrueb.com/blog/archives/63 thanks. let me write you a code of new loop for single.php wait a 5 minutes. cheers can you insert my code after this one (of your single.php)
// once again sorry, its normaly for me to write php code without php tags... yes! its working. nearly. look at the link:[[LINK href="http://piersrueb.com/blog/archives/63"]]http://piersrueb.com/blog/archives/63[[/LINK]] it now shows the url of the pic adn something with "string" above it. the thumbs show though. any ideas? thank you just delete the var_dump string witch we have insert into this tread in this file postautothumbsoff.php should you need to, you can download both files at: www.piersrueb.com/foroleg.zip Solution - 1replace by what the output on a category php? and is category php has this loop insided? |
Date: 2022-10-21 05:21:39 |
Category: Wordpress |