Strattic Support

#231374
  • Resolved Mitja Dolinsek
    Rank Math free

    Hello,

    we are currently using Strattic along with Polylang and SEOPress but the SEOPress plugin is not supported on Strattic. We are thinking thinking of moving from SEOPress to RankMath as it is supported.

    Our biggest problem are the SEOPress 301s because they work on our preview version of the website but do not work on the live website, so we need a separate redirection problem.

    The second issue is regarding the indexation; we have 20+ languages on our website and they are connected with Polylang (hreflang in the code). For some of our pages we would only like to index,follow our English version while keeping the other versions to noindex (as they do not have unique content yet) but we can currently only have all language versions indexed or none of them as they are connected.

    Is there a way to only index, follow the desired languages if they are connected in Polylang? Please see the website link below.

    Thank you very much!

    Best Regards
    Mitja Dolinšek

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    Could you please share some of the redirect samples so we can also check with Rank Math redirection? You can share it in this format:

    Source URL:
    Destination URL:

    To set those translated pages to noindex, you may need to make use of and customize this filter (you need to add the condition to check the language in Polylang):

    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
         global $wp;
         // Add here your conditional to check the slug
         // filter for only a specific post type
         // Then, if you want to exclude it:
            $robots['index'] = "noindex";
            
    
    	return $robots;
    });

    Here’s a way to check the language in Polylang:
    https://gist.github.com/habibimroncn/974ac1a8380f5f1d72b5bfa57be3589f

    And you can check this link on how to apply a filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Strattic Support’ is closed to new replies.