I'm building a site which lets users to submit links using User Submitted Posts plugin. I want every post title to link to its URL something like reddit. Moreover, User Submitted Posts plugin add URL to each post in the posts meta table. How could I do that?
1 Answer
I just released a plugin that does pretty much that... you may want to take a look at the Recommended Links plugin and see how its done... or if this plugin works, try converting your links to the custom type I'm using and just install this plugin.
My approach was to create a new custom post type for these links, add a postmeta entry for the URL they should link to, and filter the_permalink
to refer to the link from postmeta, rather than the permalink for the post. I also created a basic widget to allow users to submit their links, and filtered the_content
and comment_text
to add voting buttons to each submitted link and comment on it.