Add Image With Changeable Link in Custom Field [closed]

I made this code with help from Google search. And it works fine. I added this code in single.php bottom of the post. Now, I simply add link in every post but image are same. Thanks. 🙂 <?php if( get_post_meta($post->ID, “imglink”, true) ): ?> <p><a href=”<?php echo get_post_meta($post->ID, “imglink”, true); ?>”><img src=”http://————-.png”></a></p> <?php endif; ?>

Create custom query for search?

Have you check your result-set, what result you are getting in $query obj. another thing, there is no need to use ‘relation’ => ‘OR’, in meta query array, have a try with this as well. And instead of ‘numberposts’ use ‘posts_per_page’ this will help. 🙂 or you can remove the meta_query and make your $arg … Read more

Show comon custom field results?

//Your color codes $str1 = “000000 f0f0f0 c0c0c0 202020 404040 “; $str2 = “0000ee 555333 cc0000 602040 003399 “; $str3 = “9999cc 0000cc 0099ff 204010 552299 “; $str4 = “406040 ffffff ffcccc 000000 202020 “; $str5 = “cc0000 99ffcc cc9900 ff9999 000000 “; //creating an array and merging all codes $final_arr = array_merge( explode(” “,$str1),explode(” … Read more