Outbound Links Same Cluster

The Outbound Links Same Cluster function identifies and retrieves links from a specific post that lead to other posts within the same taxonomy (like categories or tags). This helps you understand how posts are connected based on shared topics, enhancing navigation and SEO.

How It Works:

  • Retrieve Taxonomy: It starts by checking the selected taxonomy from the settings, defaulting to 'category' if none is set.

  • Get Post Details: The function fetches the content of the specified post and identifies the terms (like categories) associated with it.

  • Find Related Links: It searches through the post’s content for regular anchor links (standard HTML links) and checks if these links point to other posts within the same taxonomy. It also looks for any shortcode links (special placeholders) that may reference related posts.

  • Compile Results: Finally, it collects details about the linked posts, including their titles, types, and the anchor text used in the links, and returns this information.

Specific Example:

Consider you have the following posts:

  • Post 1: "Benefits of Organic Gardening" belongs to the 'Gardening' category.

  • Post 2: "How to Start an Organic Garden" also belongs to the 'Gardening' category.

  • Post 3: "Top 10 Garden Tools" belongs to the 'Tools' category.

Post 1 contains:

  • A link to Post 2 with the anchor text "Read this guide."

  • A link to Post 3, but it doesn’t share the same category.

[
    [
        'ID'          => 2,  // ID of Post 2 ("How to Start an Organic Garden")
        'title'       => 'How to Start an Organic Garden',
        'type'        => 'post',
        'terms'       => 'Gardening',
        'anchor_text' => 'Read this guide',
    ],
]
  • Post 1 links to Post 2, which is also in the 'Gardening' category, with details like the title, post type, categories, and the anchor text used in the link.

Summary:

The Outbound Links Same Cluster function is a useful tool for identifying and collecting links from a specific post to other posts that share the same taxonomy. This helps improve the structure of your content, making it easier for readers to navigate related topics and enhancing your site's SEO performance.

Last updated