RankMath SEO for ACF custom post type

#692068
  • Resolved Kasper
    Rank Math free

    Hi,

    I have made a custom post type, and I am only able to control SEO in RankMath for specific “items” within the custom post type. But I am not able to control SEO in RankMath for the archive page (only the title tag and meta description within the RankMath –> Titles and Metas settings. And I want to be able to do that. Can you guide me in how I can activate that? Eg. I want to be able to define my keyword which I can’t define atm.

    https://imgur.com/a/nzac68P

    Please look at the sensitive data.

Viewing 7 replies - 16 through 22 (of 22 total)
  • Hello,

    Sorry for the unexpected delay and any inconvenience caused due to that.

    I have added the following filter to your theme’s functions.php file and now the archive page is being added to the breadcrumbs on the taxonomy pages:

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs ) {
    	$archive = ['Lydbøger',
    			   'https://bookpare.dk/lydboeger/'];
        if ( get_post_type() == 'lydbog' && is_tax() ) {
            array_splice($crumbs, 1, 0, array($archive));
        }
        return $crumbs;
    }, 10, 1);
    

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

    Hi again,
    Thanks. And if I also end up making an Genre archive page (/genre/), how can i then make sure that the breadcrumb on that page is: Hjem – Lydbøger – Genrer

    Update:

    I think this code worked, right?

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs ) {
        $archive = ['Lydbøger',
    				'https://bookpare.dk/lydboeger/'];
        if ( get_post_type() == 'lydbog' && is_tax() ) {
            // Insert the 'Lydbøger' breadcrumb
            array_splice($crumbs, 1, 0, array($archive));
    
            // Remove the 'Genrer' breadcrumb, assuming it's now at a specific position
            array_splice($crumbs, 2, 1); // Adjust the index 2 if 'Genrer' is at a different position
        }
    
        return $crumbs;
    }, 10, 1);

    Hello,

    If the Genrer is also a taxonomy, then the code should add the archive page in the breadcrumbs. If not, then you will have to modify the code. The code you shared should work fine to remove the Genrer from the breadcrumbs.

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

    Hi,

    I am really wondering why it should not be possible with RankMath to control SEO TITLE + SEO META DESCRIPTION for CPT archive pages (created e.g. with ACF or CPT UI).

    Please check this video. It shows that this is easily possible with YOAST:
    https://www.youtube.com/watch?v=6hCHnJ5Imhc
    https://www.youtube.com/watch?v=-vEitRreqWw

    Please also check SEOPress, where this can be easily done too:
    See this screenshot: https://share.cleanshot.com/Gq88drfHvd79QkPCTYkD
    => I have tested this right now on my own, cause we are on the fence switching to SEOPress

    Looking forward to your urgent reply and I really do expect an easy solution for this. Can’t believe that it’s not possible with RankMath … this is a huge fail, especially if you are working heavily with Archive Pages.

    Thanks and best regards
    Michael

    I just found out that you can set SEO Titles and SEO Meta Descriptions for CPT Archive Pages in RankMath too. It’s easy and can be done in the native CPT Settings, like here:

    src=”https://share.cleanshot.com/BlDVfTSvfGt1ZKfYvnvk” alt=”SEO Title and SEO Desc for CPT Archive Pages” />

    Hello @info924,

    Thank you so much for getting in touch.

    We are glad that you are able to locate the title and description meta option for your CPT archives.

    Please do not hesitate to let us know if you need our 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 7 replies - 16 through 22 (of 22 total)

The ticket ‘RankMath SEO for ACF custom post type’ is closed to new replies.