Creating relationships between posts in WordPress - wordpress

Is there a way to create an exlicit relationship between two posts in WordPress regarless of what categories those posts might be in?
The idea is that within the post template it would be obtain and list the related posts for the current post.
I'm guessing you could achieve this using tags to group posts together, but that seems to be a hi-jacking of the tag system for a purpose for which is wasn't designed.
Any ideas?

Would adding post IDs as meta data help? I had written a quick hack to display the Digg box for posts that were submitted to Digg. I was manually adding a digg_url meta field with the Digg URL. Perhaps you could add multiple related__post fields and add some code to iterate through all and render post links? Are you looking for a more automated solution?

Maybe I didn't catch the point, but Categories are not just there for that purpose?

I may have miss understood the question. But tags, archives and categories are there to "connect" posts, on the basis of that common connection.
Other than that, I can only see ...
Manually linking posts from with the text of a blog post or
Using plugins. Two I user are similar posts (http://rmarsh.com/plugins/similar-posts/) and SEO Smart Links (http://www.prelovac.com/vladimir/wordpress-plugins/seo-smart-links)
Similar posts if highly configurable and allows the blog to automatically suggest "related posts" and SEO Smart Links, links (in post) words or phrases to related posts.
All the best
stephen

Related

WordPress Custom Post Logic

I'm a newbie here, but I've been trying to understand and research this for the past couple of days to no avail.
I created a custom post type (video) with a taxonomy associated with it (industries). The taxonomy "industries" has multiple categories (I'm not sure if in this case they are called terms rather than categories; correct me if I'm wrong!) such as IT, Construction, etc. For arguments sake, let's say under the category IT there is a single post named Web Developer.
First question: With the logic above, how would I manage to reach the single post (web developer) with the URL: .../video/IT/web developer?
Second question: If on the video page I would like to display all posts in all categories, what template page should I create? Is it archive-video.php? The same question goes for the category (IT in this case): Which template page should I create in order to display all posts under a specific category?
I'll answer your second question first:
Yes, the template you should use for displaying all the custom post types would be the CPT archive, so archive-video.php sounds right.
For the categories (the exact way to say it would be "taxonomy terms" indeed), you would use taxonomy-{taxonomy}.php or even taxonomy-{taxonomy}-{term}.php if you need to get more specific.
About your first question, there is currently no core functionality to use custom taxonomies in your permalinks, but this might help you.

List posts with embedded videos

is there a way to list posts which have embedded videos in the content. Newly added posts needs to be automatically added to the list also.
I am using Wordpress.
Thanks
The best approach would be to create a category for the posts with the video and then query that category. Can you do that?
For this I feel that
You need to create one time function which will execute on some hook and will search through your content for the links related to videos(video site url's).
If any post having that link it will assign category to that post.

Link pages to custom post types

I have a WooCommerce site which has a custom post type named 'products'.
Each product is associated with 1 or more technologies which I have detailed in a set of pages. There are 8 pages in all, one for each technology. The pages are accessible in a "Technologies" menu on the site.
I want to be able to link products and technologies so that I may call up the linked pages on product pages. I will have a technologies section where I will list the technologies, the key image and excerpt. The thing is, every product uses different technologies.
What I have imaged as a solution is a way to link the pages to the product much like I would link categories. Then on the product page, I can get the attached pages to that product.
From what I understand from your question, the answer is available at the Wordpress codex. If this is not the case, you probably have to formulate your question better.
From that page from the codex, you can pick up a line as simple as this one:
<?php wp_list_pages('post_type=yourcustomtype&title_li='); ?>
I've found a very useful plugin called "Advanced Custom Fields"(http://www.advancedcustomfields.com/) which allows this. With this plugin, you can create Relations between a post and other posts/pages.
Then in you post, you can call up the related post objects and pull all the information you like from them.

Wordpress - Best way to differentiate between Blog Posts and News Posts

I am implementing a clients website in wordpress that has both news and blog posts. The homepage is satic page but the nav bar has the links to two different types of posts - NEWS AND BLOGS. Though both are exactly same however they are to be made accessible entirely separate from each other through the navigation bar.
Now I would like to know what is the best possible way to differentiate between the two in the admin panel:
I mean i can create custom post types for either one or for both the types or on the other hand create no custom post type but just a taxonomy to divide the two into different parts as news posts and blog posts. Also I think I can use the custom field option to differentiate between the two...
Kindly keep in mind that the news and blog posts will be made by the client himself...
Going with this train of thought
Kindly keep in mind that the news and blog posts will be made by the client himself
I think that the best option would be to create a custom post type for "news" and leave the standard blog posts unchanged.
As you can see in the official documentation. Once you create a custom post type, a new top-level option will be created in the admin panel.
Which would allow for the following use scenarios:
Posts > Add New
Posts > All Posts
News > Add New
News > All News
Keeping the taxonomies out of this is also a good idea. Because that would allow you to keep them meaningful and share them among different post types.
e.g: clicking on "open source" category would show a list of "posts" and "news" related to that particular topic.
This yoast article covers a few more advanced scenarios and how to manage them.
Using custom-fields would probably confuse the end user. Especially because there will be times where they forget to add the field altogether, and wonder why the post is not showing on the page at all.
hope this helps
J

Similar By Terms module

I have a blog where you can add tags. I wanted to see the related blogposts to this tag in a view so i created one with the module Similar By Terms.
However, i can't seem to link old blog posts to new posts. Only new posts to old posts.
what does this mean? when i add a new blog i get all past blog post with the same tag posts. But when i click on them i dont see my new blog in the similar tags list.
can anyone help me with this?
Are you running Drupal's cron? I imagine that is how they would generate the similar terms - at least it was when I used this module in Drupal 5.
Just go to yoursite.com/cron.php and then check the old posts.

Resources