Code Broken

#28759
  • Resolved Suvidha Search
    Rank Math free

    Notice: RankMath\Helper::register_var_replacement() is deprecated since version 1.0.34! Use rank_math_register_var_replacement() instead. in /home/ebivcipm/public_html/wp-includes/functions.php on line 4440

    my page is not showing google seo..

Viewing 15 replies - 1 through 15 (of 21 total)
  • Hello,

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

    Could you please check the following on your site:
    – Is your server running at least PHP 7.x.x? This info should be available on your hosting dashboard?
    – Is there any custom code on your theme that could be registering custom variable replacements?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    – Is your server running at least PHP 7.x.x? This info should be available on your hosting dashboard?
    running on php 7.2

    – Is there any custom code on your theme that could be registering custom variable replacements?

    below is my custom code

    add_action( ‘rank_math/vars/register_extra_replacements’, function() {
    $args = [
    ‘name’ => esc_html__( ‘Listing Category’, ‘rank-math’ ),
    ‘desc’ => esc_html__( ‘Category of the current listing’, ‘rank-math’ ),
    ‘example’ => RMPrimaryCategoryToListingCallback()
    ];
    RankMath\Helper::register_var_replacement( ‘listingCat’, ‘RMPrimaryCategoryToListingCallback’, $args );

    $args = [
    ‘name’ => esc_html__( ‘Listing Location’, ‘rank-math’ ),
    ‘desc’ => esc_html__( ‘Location of the current listing’, ‘rank-math’ ),
    ‘example’ => RMPrimaryLocationToListingCallback()
    ];
    RankMath\Helper::register_var_replacement( ‘listingLocation’, ‘RMPrimaryLocationToListingCallback’, $args);
    $args = [
    ‘name’ => esc_html__( ‘Listing Tag’, ‘rank-math’ ),
    ‘desc’ => esc_html__( ‘Tag of the current listing’, ‘rank-math’ ),
    ‘example’ => RMPrimaryTagToListingCallback()
    ];
    RankMath\Helper::register_var_replacement( ‘listingTag’, ‘RMPrimaryTagToListingCallback’, $args);

    });

    Hi there,

    Thank you for the reply.

    Could you please replace the above code with the following and let us know how this goes:

    add_action( ‘rank_math/vars/register_extra_replacements’, function() {
    $args = [
    ‘name’ => esc_html__( ‘Listing Category’, ‘rank-math’ ),
    ‘desc’ => esc_html__( ‘Category of the current listing’, ‘rank-math’ ),
    ‘example’ => RMPrimaryCategoryToListingCallback()
    ];
    rank_math_register_var_replacement( ‘listingCat’, ‘RMPrimaryCategoryToListingCallback’, $args );
    
    $args = [
    ‘name’ => esc_html__( ‘Listing Location’, ‘rank-math’ ),
    ‘desc’ => esc_html__( ‘Location of the current listing’, ‘rank-math’ ),
    ‘example’ => RMPrimaryLocationToListingCallback()
    ];
    rank_math_register_var_replacement( ‘listingLocation’, ‘RMPrimaryLocationToListingCallback’, $args);
    $args = [
    ‘name’ => esc_html__( ‘Listing Tag’, ‘rank-math’ ),
    ‘desc’ => esc_html__( ‘Tag of the current listing’, ‘rank-math’ ),
    ‘example’ => RMPrimaryTagToListingCallback()
    ];
    rank_math_register_var_replacement( ‘listingTag’, ‘RMPrimaryTagToListingCallback’, $args);
    
    });

    Thank you.

    now page is not working..post replacing above code..

    https://prnt.sc/qsmipr

    Hello,

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

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    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 Suvidha,

    Everything seems to be working fine in your site from my end. Could you mind sharing how to reproduce the error if it is still appearing on your end.

    Looking forward to helping you.

    https://www.loom.com/share/ee8b008695fe46ae91e71750c1165858

    watch my video carefully you will understand..

    Hello,

    Please replace the existing replace variable code with the following:

    
    add_action( 'rank_math/vars/register_extra_replacements', function() {
    
    	rank_math_register_var_replacement(
    			'listingCat',
    			[
    				'name'        => esc_html__( 'Listing Category', 'rank-math' ),
    				'description' => esc_html__( 'Category of the current listing', 'rank-math' ),
    				'variable'    => 'listingCat',
    				'example'     => RMPrimaryCategoryToListingCallback(),
    			],
    			'RMPrimaryCategoryToListingCallback'
    		);
    
    	rank_math_register_var_replacement(
    			'listingLocation',
    			[
    				'name'        => esc_html__( 'Listing Location', 'rank-math' ),
    				'description' => esc_html__( 'Location of the current listing', 'rank-math' ),
    				'variable'    => 'listingLocation',
    				'example'     => RMPrimaryLocationToListingCallback(),
    			],
    			'RMPrimaryLocationToListingCallback'
    		);
    
    	rank_math_register_var_replacement(
    			'listingTag',
    			[
    				'name'        => esc_html__( 'Listing Tag', 'rank-math' ),
    				'description' => esc_html__( 'Tag of the current listing', 'rank-math' ),
    				'variable'    => 'listingTag',
    				'example'     => RMPrimaryTagToListingCallback(),
    			],
    			'RMPrimaryTagToListingCallback'
    		);
    
    });
    

    That should fix the issue.

    Thank you.

    Awaiting for reply

    hi pratik saved ur code but still facing the problem
    u can check by clicking any category link.

    https://suvidhasearch.com/cat/restaurants/
    https://suvidhasearch.com/cat/restaurants-in-patna/
    https://suvidhasearch.com/cat/active-life/
    https://suvidhasearch.com/cat/automotive/
    https://suvidhasearch.com/cat/beauty-spas-center/

    notice one thing getting this error with primary category only…..
    sub-categories are fine

    Hello,

    Thank you for contacting Rank Math today.

    I have just logged in to your site but I could not reproduce the error. Could you please check again?

    Looking forward to helping you. Thank you.

    ​​​​​​

    Did u click all Above link ?

    Hi there,

    Thank you for the follow up.

    I am unable to make changes to your theme using the theme editor.

    Could you please share some FTP access instead?

    Hope to hear back soon.

    i have installed the file manager, you can edit by…
    go to file manager and check file

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

The ticket ‘Code Broken’ is closed to new replies.