• Resolved marcusquinn

    (@surferking)


    Currently, the Pretty Links Post Type isn’t available as an option for RankMath Instant Indexing (available in the free version).

    This is super handy for getting foundational backlinks indexed.

    If you compare to the similar (albeit simpler) Affiliate Links Lite plugin, that creates a public Affiliate Links post type that’s recognised by RankMath Instant Indexing.

    I believe a simple setting fix in your Post Type registration, with no adverse consequences.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Tyler

    (@tylerthedude)

    Hi @surferking,

    Thank you for reaching out. Could you please try adding this bit of code either to your child theme’s functions.php file or using a plugin such as WP Code, and see if that allows the pretty link custom post type to show up in RankMath’s Instant Indexing feature?

    add_filter('register_post_type_args', function($args, $post_type) {
      if($post_type == 'pretty-link') {
        $args['public'] = true;
      }
    
      return $args;
    }, 10, 2);

    If you’re using WP Code to add in this bit of code, you’ll want to ensure that the “Code Type” field is set to “PHP Snippet” and that the “Location” field underneath the “Insertion” section is set to “Run Everywhere”.

    I hope this helps!

    Kind regards,

    Thread Starter marcusquinn

    (@surferking)

    Thanks @tylerthedude

    Great – that worked for this exact need and scenario.

    Plus, also makes Pretty Links available in Menus, which could be useful.

    I can’t see any downsides to making this a change to your core plugin codebase.

    I think it’s worth making it a notable feature mention, as it adds value to your plugin in combinations with RankMath Instant Indexing with Index Now.

    Then Pretty Links can be used to instant index external URLs, for example; guest posts on other websites, newly created social media profiles, canonical URLs on other platforms like Medium and Linkedin, etc.

    Please do let me know if you do in a future release, so I can remove the duplicate snippet.

    Tyler

    (@tylerthedude)

    Hi @surferking,

    Thank you for getting back to me, and I’m glad to hear that did the trick for you. I’ll reach out to our development team and see if we can look into the possibility of making the pretty links public or add an option for it in a future release. I believe they’re not public by default to avoid being added to the sitemap which some users may not want for their affiliate links.

    Kind regards,

    Thread Starter marcusquinn

    (@surferking)

    Makes sense. Perhaps make it a general setting opt-in, then.

    RankMath site maps are produced per post-type — and each post-type has to be opted into, so shouldn’t be an issue for those users.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Enable the Post Type for RankMath Instant Indexing’ is closed to new replies.