Problem with primary category

#941245
  • Resolved J. E.
    Rank Math free

    We have a problem with the primary categories.
    We assign posts on our website to several categories

    e.g.
    “Berlin” and “Nature Museum”

    Although the primary category is assigned to “Berlin”, the category page in the loop always links to the category “Nature Museum”.

    How can we solve the problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    We have received similar cases regarding the primary category issue.

    For troubleshooting, please update the plugin to the latest version and replace the code on line 251 of the wp-content/plugins/seo-by-rank-math/includes/class-common.php with the following code to fix the issue:

    if ( empty( $terms ) || ! in_array( absint( $primary ), $terms, true ) ) {
    

    Let us know how this goes.

    J. E.
    Rank Math free

    Hi Reinelle,

    now it works thank you so much.

    Hello,

    You’re welcome.

    The fix will be added as well on the next update of Rank Math.

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind us asking, could you please leave us a review (if you haven’t already) on
    https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post

    about your overall experience with Rank Math? We appreciate your time and patience.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Problem with primary category’ is closed to new replies.