Wrong url and title for all sub level of the site map

  • Hy team !
    Love your work but one little thing is that on my site map the first level work well but when i enter sub level like page it show wrong url and title, just a letter “h” with a link “my-domain.com/h” (the number of line is good)

    i have tested to go back to previous version, tested to update permalink, tested to update sitemap settings.
    noting has worked out

    i use elementor 2.6.7 pro 2.6.1
    on WP : 5.2.4

    Screenshot : https://zupimages.net/up/19/46/uvfr.png

    • This topic was modified 3 weeks, 3 days ago by Admaker.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    This suggests that there is a conflict with one of your installed plugins/theme. Could you please perform the diagnostic steps on the following page and let us know if you are able to isolate the culprit: https://rankmath.com/kb/check-plugin-conflicts/

    Looking forward to helping you. Thank you.

    ​​​​​​​

    I had already tested this solution too, but I couldn’t find which plugin it came from last time because your sitemap only updates itself when there is a postupdate…

    Now I’ve found out where it comes from:
    The LoginDesigner plugin is involved
    His Version 1.1.12 work with Rankmath but the last 1.2.0 do not.

    I also contacted plugin support at this URL:
    https://wordpress.org/support/topic/conflict-with-rankmath-sitemap-xml/

    • This reply was modified 3 weeks, 3 days ago by Admaker.
    • This reply was modified 3 weeks, 3 days ago by Admaker.

    Hello,

    Thank you for contacting Rank Math today.

    I am glad that you were able to identify the cause of the conflict. Please update us on how this goes, we would be happy to offer any help in fixing this.

    Looking forward to helping you. Thank you.

    ​​​​​​

    the plugin developer need to use this hook instead no ? :

    He try to exclude the login-designer page from the sitemap.

    
    /**
     * Filter the URL Rank Math SEO uses in the XML sitemap.
     *
     * Note that only absolute local URLs are allowed as the check after this removes external URLs.
     *
     * @param string $url  URL to use in the XML sitemap
     * @param object $post Post object for the URL.
     */
    add_filter( 'rank_math/sitemap/xml_post_url', function( $url, $post){
    	return $url;
    }, 10, 2 );
    
    

    his function part :

    
    $page = Login_Designer()->get_login_designer_page();
    
    

    gave the full array of the post, then he extract the permalink from it.

    So one little question :
    Where is your hook for : $posts_to_exclude ?

    Tx in advance

    • This reply was modified 2 weeks, 6 days ago by Admaker.
    • This reply was modified 2 weeks, 6 days ago by Admaker.
    • This reply was modified 2 weeks, 6 days ago by Admaker.

    ## BUG PATCHED ##
    I think i have solve the problem.
    Can you just tell me if it’s the right way to do it :

    
    add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ) {
      // Pull the Login Designer page from options.
      $ldpage = Login_Designer()->get_login_designer_page();
      $ldurl = get_permalink( $ldpage );
      $type = $ldpage->post_type;
      if (($key = array_search($ldurl, $url)) !== false) {
        return FALSE;
      }
      return $url;
    
    }, 10, 3 );
    
    
    • This reply was modified 2 weeks, 6 days ago by Admaker.

    Hello,

    Thank you for contacting Rank Math today.

    I am glad that you were able to figure this out. The code looks like it should work smoothly.

    Looking forward to helping you. Thank you.

    ​​​​​​

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

The ticket ‘Wrong url and title for all sub level of the site map’ is closed to new replies.