Can’t remove “fusion_template” from sitemap and filters not help.

#34449
  • Resolved Amr
    Rank Math free

    Hi,
    I need to remove a url from sitemap “fusion_template”, It’s not visible in sitemap options so i can not disable it, also i’ve tried using the filters,But no success.
    Can you please advise for how to remove this url ?
    Thanks.

    • This topic was modified 4 years ago by Amr.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    Thank you for contacting Rank Math today.

    I have submitted this problem to our dev team for closer investigation and we will be getting back to you in a short while.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Todd
    Rank Math free

    Hi Amr,

    Thanks for getting in touch with us.

    You can use this filter to do that: https://rankmath.com/kb/filters-hooks-api-developer/#change-remove-archive-url

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

    Amr
    Rank Math free

    Hello Todd,

    Thanks for the reply,
    I’ve used the filter, and it didn’t work

    add_filter( 'rank_math/sitemap/fusion_template', function( $archive_url, $post_type ){
    	return $archive_url;
    }, 10, 2 );

    Please advice if there is a mistake in the code.

    Thanks.

    Michael Davis
    Rank Math pro

    Hello,

    Thank you for the follow up.

    If you don’t mind, would you please share the values (if any) that you have assigned to the $archive_url and $post_type variables so we can look further.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Amr
    Rank Math free

    Hello,

    Thanks for the fast respond,

    the link in sitemap is /fusion_template-sitemap.xml

    the filter i used :
    add_filter( ‘rank_math/sitemap/fusion_template‘, function( $archive_url, $post_type ){
    return $archive_url;
    }, 10, 2 );

    Amr
    Rank Math free

    Hello,

    Any update please ?

    Michael Davis
    Rank Math pro

    Hi there,

    Apologies for the delay.

    I have submitted this to our dev team for closer investigation and we will be in touch in a short while.

    We appreciate your patience.

    Hello,

    The code my colleague suggested was to change the archive link. Since the fusion-template sitemap is added in the index, you must use the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#exclude-post-type-fro-sitemap

    I logged into your site and I replaced the code with:

    
    add_filter( 'rank_math/sitemap/exclude_post_type', function( $value, $type ){
    	if ( 'fusion_template' === $type ) {
    		return true;
    	}
    	return $value;
    }, 11, 2 );
    

    That seemed to have fixed the issue. Can you please confirm?

    Thank you.

    Amr
    Rank Math free

    Hello,

    Thanks for the respond.

    The code is working now.

    Problem solved, Thank you so much for your help and fast response

    • This reply was modified 4 years ago by Amr. Reason: add more text
    • This reply was modified 4 years ago by Amr.
    Amr
    Rank Math free

    Hello,

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

    Thank you.

    Michael Davis
    Rank Math pro

    Hello,

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

The ticket ‘Can’t remove “fusion_template” from sitemap and filters not help.’ is closed to new replies.