Automate the Insertion of Focus keyword Using Taxonomy Title As Focus Keyword

#339055
Viewing 13 replies - 1 through 13 (of 13 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    Can you please share the name of your CPT and taxonomy so we can assist you further?

    Looking forward to helping you.

    Hi,

    Taxonomy name is episodes which is the taxonomy of series a custom post

    Thanks

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi,

    I Added Login details And Already Did Full Backup on my site..

    Thanks.

    Hello,

    I applied the filter code into your theme child and the taxonomy keyword has been added as you can see in my screenshot here:

    taxonomy

    You have a lot of taxonomy added to a single post and it is not ideal to add them all so I instead limit the adding of keywords to 5 keywords only.

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

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi, Thanks much for the help but What I want is Episodes Taxonomy to have their own Keywords. See Example url in Sensitive Data Section, I have Set Keyword my self for that Episode..

    That is what I want if Possible…

    Example The Episode Title is “Watch 1883 Season 1 Episode 1 Online Free” I want Episode Keyword to be The Same As Title..

    As You can See in This Screenshot: Keyword Example

    So When use Google for that Episode He can find it in Google Easily with that keyword, See Google result Example in this Screenshot: Google result

    Thanks.

    Hello,

    The code snippet we have in our documentation will only work for post types and cannot be used for the taxonomies.

    For that, the code would need to be extensively modified as the functions used for taxonomies are different than the ones used for posts.

    These high-level customizations fall outside the scope of our support and if you need to create that custom code you would need to hire a developer that could replicate that example into taxonomies as well.

    Hope this helps clarify your doubts.

    Don’t hesitate to get in touch if you have any other questions.

    Hi, Thanks much for The Support. Rank Math Support is Great.

    My other question is I want to Enable Auto Keywords using Tags on Series And Movies Post Type.. How Can I Do that.. I mean How to Combine those Two post type in one code so that I can Add it in Function.Php

    Hello,

    You would need to implement the filter code 2 times. One is for the Series post type and the other is for Movies.

    If you do need to combine the automation code into one function, you may refer to my example code below instead:

    function update_focus_keywords() {
        $posts = get_posts(array(
            'posts_per_page' => 100,
            'post_type' => 'series'
        ));
        foreach ($posts as $p) {
            $keywords = [];
            if (get_the_tags($p->ID)) {
                foreach ((get_the_tags($p->ID)) as $tag) {
                    $keywords[] = strtolower($tag->name);
                }
                update_post_meta($p->ID, 'rank_math_focus_keyword', implode(", ", array_unique($keywords)));
            }
        }
    
        $posts = get_posts(array(
            'posts_per_page' => 100,
            'post_type' => 'movies'
        ));
        foreach ($posts as $p) {
            $keywords = [];
            if (get_the_tags($p->ID)) {
                foreach ((get_the_tags($p->ID)) as $tag) {
                    $keywords[] = strtolower($tag->name);
                }
                update_post_meta($p->ID, 'rank_math_focus_keyword', implode(", ", array_unique($keywords)));
            }
        }
    }
    add_action('init', 'update_focus_keywords');

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

    Thank you

    Hello,

    We are super happy that this issue is already resolved. 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.

    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 13 replies - 1 through 13 (of 13 total)

The ticket ‘Automate the Insertion of Focus keyword Using Taxonomy Title As Focus Keyword’ is closed to new replies.