Info
- 2 posts
- 2 voices
- Started 3 years ago by Ipstenu
- Latest reply from chrishajer
- This topic is not a support question
Linking Posts to Topics
-
- Posted 3 years ago #
This isn't a plugin, it's a 'hack' but I can't think of where else to put this.
I have blog posts (duh) and I have forum topics that, sometimes, relate. I wanted to have a way to relate the blog posts to say 'Comment here' and 'Forum chat here.'
The solution is stupid easy. I made a custom field in my blog (forum_topic) and then added this to the link with my comments link:
<?php $forum= get_post_meta($post->ID, 'forum_topic', true); if ($forum) : ?><a href="<?php echo $forum; ?>">Forum Topic</a>And now if there's a related forum topic, I make the custom field, add the link in that field for the post, and it shows up. No topic? No link!
Now if I can do that in reverse, that would be cool... related blog posts to this forum topic.
-
- Posted 3 years ago #
Custom fields in WordPress can be used for amazing things. I like your idea.
-
You must log in to post.