Yoast import successfully completed, showing wrong data

#54160
  • Resolved Anonymous
    Rank Math free

    1. I have imported data from Yoast, it is imported correctly, but on pages, everything messed up. I have attached my product meta setting and output result. (it is showing short description in product meta description).

    2. Is there an option in Rank Math to save redirects in PHP or htaccess?

    • This topic was modified 5 years ago by . Reason: added 2nd question
    • This topic was modified 5 years ago by . Reason: Solved the 1st issue myself, but still have issue of full meta decription not showing
    • This topic was modified 5 years ago by . Reason: Sorry, I am wrong not able to solve issue
Viewing 9 replies - 1 through 9 (of 9 total)
  • Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math today.

    1. I have imported data from Yoast, it is imported correctly, but on pages, everything messed up. I have attached my product meta setting and output result. (it is showing short description in product meta description).

    This is the order we follow to generate meta descriptions for WooCommerce product:

    1. Content from SEO Description field
    If that is missing, then:
    2. WooCommerce Excerpt or Product Short Description
    If that is missing, then:
    3. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
    If that is missing, then:
    4. Auto-generated Content from the product page

    If you want to show the auto-generated description from the content ( step 4 ) then, please add the code which we provided here:

    https://wordpress.org/support/topic/make-excerpt-pull-from-product-description-instead-of-short-description/#post-12358847

    2. Is there an option in Rank Math to save redirects in PHP or htaccess?

    Just head over to Rank math> Redirections and you will find an option to export to .htccess

    I hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    ​​​​​​

    Anonymous
    Rank Math free

    This is the order we follow to generate meta descriptions for WooCommerce product:

    1. Content from SEO Description field
    If that is missing, then:
    2. WooCommerce Excerpt or Product Short Description
    If that is missing, then:
    3. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
    If that is missing, then:
    4. Auto-generated Content from the product page

    If you want to show the auto-generated description from the content ( step 4 ) then, please add the code which we provided here:

    https://wordpress.org/support/topic/make-excerpt-pull-from-product-description-instead-of-short-description/#post-12358847

    I want to show the Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products (step 3)

    Please give any filter for that.

    Just head over to Rank math> Redirections and you will find an option to export to .htccess

    I am not asking about export, I am asking whether there is an option to choose to save redirects in PHP or htaccess as in yoast.

    And by default where rank math is saving redirects?

    Alberto
    Rank Math business

    Hello,

    Then, since you want to display the step 3, make sure the fields in steps 1 and 2 are empty.

    About your question, I am not sure if we understood you. Do you want to save the Rank Math redirects in your .htaccess file? If you want that, as my colleague said, you can export the redirect as he explained and save them in your .htaccess file. If it is not what you are looking for, could you help us to understand it?

    Rank Math saves those redirections in their plugin settings in the database, not in any external file.

    Looking forward to help you.

    Anonymous
    Rank Math free

    Sorry, I can’t remove step 1 and step 2 from the product, it looks ugly if I remove these things and become incomplete information.

    There is no alternate solution to show product meta as we entered in product’s title and meta setting, then it is waste for me to enter any field in title and meta setting.

    There should be some filter to show very specific data in product’s meta description. Please let ne know if there us a alternate solution. If there is no solution.

    In that case i should stick with yoast, because it is showing correct data as i entered in product meta.

    Rank Math saves those redirections in their plugin settings in the database, not in any external file.

    Thanks for letting me know this.

    • This reply was modified 5 years ago by .
    Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math today.

    I am afraid that it is not currently possible to change the order from the UI but you can write some custom PHP code to return your preferred description on the single product page using the following filter:

    /**
     * Allow changing the meta description sentence from within the theme.
     *
     * @param string $description The description sentence.
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	return $description;
    });

    Looking forward to helping you. Thank you.

    Anonymous
    Rank Math free

    Sorry to say but this PHP code didn’t work for me. I directly pasted the given code in my theme’s functions.php file.

    As per my experiments, I have to manually edit the meta description of products, only then I can get my desired results if there no PHP function for that.

    It’s very strange that I am not able to show my preferred product’s meta description, even after everything set up in Rankmath plugin’s Title & Meta setting itself properly.

    • This reply was modified 5 years ago by .
    • This reply was modified 5 years ago by .
    Michael Davis
    Rank Math pro

    Hello,

    Thank you for the follow up

    You seem to have missed the comment on the code where you need to change the description parameter to the description string for your product. For example, to use the long description:

    /**
     * Allow changing the meta description sentence from within the theme.
     *
     * @param string $description The description sentence.
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
        global $product;
        $description = $product->get_description();
    	return $description;
    });

    You can have a developer tweak it to fit your requirements better.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Anonymous
    Rank Math free

    I got it fixed with this PHP code

    add_action( 'rank_math/frontend/description', function( $generated ) {
        global $post;
        if ( 'product' !== $post->post_type ) {
            return $generated;
        }
        $desc = RankMath\Helper::get_settings( "titles.pt_{$post->post_type}_description" );
        $desc = RankMath\Helper::replace_vars( $desc, $post );
        return empty( $desc ) ? $generated : $desc;
    });

    Thanks for an awesome plugin, but still I will stick with yoast premium, specifically for my this site.

    You guys killed the Yoast in term of plugin and support is also very good.

    • This reply was modified 5 years ago by .
    Alberto
    Rank Math business

    Hello Ashwini,

    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 me 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 do 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 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this ticket.