Timeline for How to add icon over specific thumb
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 9, 2013 at 17:20 | comment | added | Baerkins | @Max in regards to your if/elseif/else statements, your pastebin file is wrong. It looks like you only want to do one of two things: apply something specific to a video cat, or another image to everything else. In that case, it is just an 'if/else' statement, not an 'if/elseif' statement. If you want to specific images applied to the video cat, a different image to the meymar cat, and then no image to everything else, you would use 'if/elseif/else'. See this: pastebin.com/w8irc5kK | |
Aug 9, 2013 at 17:00 | comment | added | Baerkins | Sorry for the delay. This code doesn't go into the functions.php file, but into the template code. So if you are using this on a blog page, insert it into the page.php template where you want it to go. | |
Aug 4, 2013 at 20:53 | comment | added | Max |
anything i post its deleted...wtf? Basically i tried with this code but nothing shows up <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php $cats = wp_get_post_categories( $post->ID );if (in_array('5', $cats)) echo '<img class="vid-icon" src="http://domain.com/wp-content/uploads/2013/08/video-icon.gif">';the_post_thumbnail('large-thumb'); ?></a>
|
|
Aug 3, 2013 at 18:06 | comment | added | Max | I dont know why it wont show up the code, and the previous post is deleted, weird but i add it here so pls @user2081869 take it look pastebin.com/Htv7KSXx | |
Aug 3, 2013 at 16:25 | comment | added | Max | I tried to insert this code with a link to image here "img/video-icon.png" inside category,archive,main,and widget it self but no luck.I left out the last part as i dont need it, i dont know is that wrong..Still the image doesnt show up..I even try to wrap it with div | |
Aug 3, 2013 at 15:50 | comment | added | Max | Hi Thanks for your answer. So if i got this right.Here img/video-icon.png i add image link which is logical, and the code i add inside function.php and inside css i stlye the position of the image...or i need to add it somewhere else...it looks easy looking at this..that why i ask | |
Aug 3, 2013 at 4:12 | history | answered | Baerkins | CC BY-SA 3.0 |