chea Posted September 16, 2012 Share Posted September 16, 2012 Hey sup. I have a wordpress question. I created a custom field in my edit page called "youtube". I posted the below code in single.php. The result is what I want, just a simple text link, but the link is showing up in all posts. Any idea on what I need to do to make it so the custom field only shows up in one post? <a href="<?php echo get_post_meta($post->ID, 'youtube', true); ?>">Youtube</a></p> Quote Link to comment https://forums.phpfreaks.com/topic/268425-custom-field-value-showing-up-in-all-posts/ Share on other sites More sharing options...
Christian F. Posted September 16, 2012 Share Posted September 16, 2012 Show us the code for get_post_meta (), any other related code, what you expected it to give, and what you got. Once you've done that, we will (hopefully) have enough information to be able to help you. Copy-paste the result from your code, and not just explain it with words. After all, the more detailed information we have the easier it'll be for us to see what the actual problem is, and thus help you. PS: Please use the tags around your code, as it helps make both your post and your code a lot easier to read. I would also recommend that you read this article, for future posts. Quote Link to comment https://forums.phpfreaks.com/topic/268425-custom-field-value-showing-up-in-all-posts/#findComment-1378325 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.