Meta data tags are empty for MyListing Theme

#40841
  • Resolved Alexander
    Rank Math free

    I am using MyListing theme:
    https://themeforest.net/item/mylisting-directory-listing-wordpress-theme/20593226

    If I am trying to pull meta data from a listing e.g. %listing_type% %listing_region% %listing_category% or %tags% etc. Rankmath doesn’t use it at all. There are just empty values. Even using %customterm(listing_type)% etc. doesn’t work aswell.

    The same thing doesn’t work for any meta tags in Categories, Regions, Custom Taxonomies etc.

    The only tag which is working is %excerpt% which shows the description of the added listing.

    So showing listing type terms & taxonomies as tags for Rankmath for added listings is not working.

    Can you help me with that? Is there a hotfix which can I add in the function.php in my child theme?

    • This topic was modified 4 years ago by Alexander.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Todd
    Rank Math free

    Hi Alexander,

    Thanks a lot for your query and we are so sorry about the trouble this must have caused.

    Could you please talk to your theme provider and ask them if they even have custom variables for using in SEO plugins like Rank Math or some of our competitors? If they have variables, please share them with us so we can check from our end and then suggest a fix accordingly.

    We look forward to helping you.

    Alexander
    Rank Math free

    Hi Todd, thanks for your answer.

    The Theme provider told me that they have added custom variables for Yoast SEO Plugin. But I don’t want to use Yoast because its too blown up.

    Following tags are supported:
    %customterm(job_listing_category)%
    %customterm_desc(job_listing_category)%
    %customterm(region)%
    %customterm(taxonomy-name)%
    %customterm_desc(case27_job_listing_tags)%
    %customterm(case27_job_listing_tags)%

    But what I am missing is to have the title meta tag of a listing type.
    I guess a listing type is the main component (page) to display taxonomies and its values. For Example you can have “Cars” as a listing type and a taxonomy called “Car Models”. It’s currently possible to show this meta tag e.g. %customterm(car-models)% but not %customterm(cars)%

    Alexander
    Rank Math free

    Hi Todd, thanks for your answer.

    The Theme provider told me that they have added custom variables for Yoast SEO Plugin. But I don’t want to use Yoast because its too blown up.

    Following tags are supported:
    %customterm(job_listing_category)%
    %customterm_desc(job_listing_category)%
    %customterm(region)%
    %customterm(taxonomy-name)%
    %customterm_desc(case27_job_listing_tags)%
    %customterm(case27_job_listing_tags)%

    But what I am missing is to have the title meta tag of a listing type.
    I guess a listing type is the main component (page) to display taxonomies and its values. For Example you can have “Cars” as a listing type and a taxonomy called “Car Models”. It’s currently possible to show this meta tag e.g. %customterm(car-models)% but not %customterm(cars)%

    I have updated the sensitive data as requested.

    • This reply was modified 4 years ago by Alexander.
    Todd
    Rank Math free

    Hi Alexander,

    It is possible that some of the custom terms work only on certain post types.

    For example, %customterm(cars)% might only work on archives but not on individual listings.

    If that doesn’t work, we might need to take a closer look at the settings. Please 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.

    Alexander
    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,

    Thank you for contacting Rank Math today.

    Each of the variables will need to be registered for Rank Math in the same way that they got registered for Yoast. Could you please check if your theme author can share the code used so that we can help in adopting it for Rank Math?
    This is the filter that they can also use to register the code for Rank Math:

    /**
     * Action: 'rank_math/vars/register_extra_replacements' - Allows adding extra variables.
     */add_action( 'rank_math/vars/register_extra_replacements', function(){
     rank_math_register_var_replacement(
     'custom_variable_slug',
     [
     'name'        => esc_html__( 'Custom variable name.', 'rank-math' ),
     'description' => esc_html__( 'Custom variable description.', 'rank-math' ),
     'variable'    => 'custom_variable_slug',
     'example'     => 'custom_variable_callback()',
     ],
     'custom_variable_callback()'
     );
    });
    

    Looking forward to helping you. Thank you.

    ​​​​​​

    Alexander
    Rank Math free

    Okay thanks. I shared it to the Theme Developers and wait for an answer.
    Will I be able to use listing type title as meta tag with your snippet?

    Todd
    Rank Math free

    Hi Alexander,

    Good to hear.

    You should be able to do that once the theme developers implement the code.

    Alexander
    Rank Math free

    This is working to have listing type names as meta tags in your listings. Unfortunately it’s currently not supported to be shown in the RankMath preview box. But it’s working and added to the source code.

    add_action( 'mylisting/submission/save-listing-data','add_listing_type_names', 99, 2 );
    add_action( 'mylisting/admin/save-listing-data','add_listing_type_names', 99, 1 );
     
    function add_listing_type_names( $listing_id, $fields = [] ){
        $listing = \MyListing\Src\Listing::force_get( $listing_id );
        update_post_meta( $listing->get_id(), '_' . 'listing_type_plural_name', $listing->type->get_plural_name() );
        update_post_meta( $listing->get_id(), '_' . 'listing_type_singular_name', $listing->type->get_singular_name() );
    }
    Now you may use these variables for singular and plural
    
    %customfield(_listing_type_singular_name)%    //singluar
    %customfield(_listing_type_plural_name)%.    //plural
    
    • This reply was modified 4 years ago by Alexander.
    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 10 replies - 1 through 10 (of 10 total)

The ticket ‘Meta data tags are empty for MyListing Theme’ is closed to new replies.