kasperbs
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Please explain these three lines for meBy doing my own research I now understand how to use this.
I guess it was the if statement that I didn’t really knew how to use. And the (not equal to) also confused me a bit.
Forum: Plugins
In reply to: Show related posts with excerpt and key/valueCheers mate, it makes sense. It doesn’t affect anything at all, your code works perfect without it. Thanks you very much again I appreciate you taking the time to help me, quality support you have given me with this issue.
Forum: Plugins
In reply to: Show related posts with excerpt and key/valueThanks man!
It seems to work perfectly, I’m not finished implementing it yet, but unless I comment out the last
rewind_posts();
It won’t work.
Basically if I don’t do it, the single post that is displaying keeps coming over and over again repeating itself forever.I have had this problem before when trying to implement code I’ve got from the net. Could you please explain why that happens, and if I need that rewind_posts(); in there at all?
Thanks
Forum: Fixing WordPress
In reply to: Quick image linking to my upload directoryIs
<img src"<?php bloginfo(url); echo '/wp-content/uploads/'; ?><?php echo $custom_field; ?>" />
Really the only option in order to do that?Forum: Plugins
In reply to: Show related posts with excerpt and key/valuethe following piece of code:
<?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ' '; } } ?>
return the tags related to a post, lets say for this example it returned the following: wordpress “racing cars” cereal
Now i want to gather all posts that have one or more of these tags associated with them. From those posts I want to select two random posts and show them like above with the excerpt and and image from a custom field.
Hope it clarifies. I know it’s very specific but it’s not uncommon to see related posts shown with an image and a summary. Check the very bottom of this page, that is very similar to what I would like to do:
https://globalflyfisher.com/patterns/pinkpig/