Hello,
We apologize for the issue you are facing with Rank Math not recognizing your dynamically generated pages properly. Thank you for providing the code snippet you are using.
It seems like you are trying to capture the output of a specific template and return it for Rank Math to analyze. However, there might be a few things to check:
-
Template Path: Ensure that the path you are using in get_theme_file_path( 'themes/z_full_width.php' )
is correct. It should point to the actual location of your template file. You might want to use get_template_directory()
or get_stylesheet_directory()
depending on whether you are using a parent or child theme.
-
Hook Priority: The filter you are using (rank_math/frontend/content
) might need to be adjusted in terms of priority. You can try changing the priority of your filter to ensure it runs at the right time:
add_filter( 'rank_math/frontend/content', function( $content ) {
// Your existing code
}, 10 ); // Adjust priority if needed
-
Debugging: You can add some debugging statements within your function to see if it is being executed as expected. For example, log the $template
variable to ensure it is capturing the correct template slug.
If these suggestions do not resolve the issue, please reply to this ticket with your site URL so we can further investigate the problem. A human agent from our support team will take over and assist you more effectively.
Cheers!
This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.
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.