Errors in code snippets

#818393
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    I apologize for the issues you are facing with the code snippets provided in the article to remove dates from search results. I understand that you are encountering Unexpected Token errors when adding the code to the custom code section of your Avada theme.

    To address the errors, it’s essential to ensure that the code snippets are correctly added and formatted. However, based on the screenshot you provided, it seems like there might be syntax errors in the way the code is being added or interpreted by your theme.

    Here are a few suggestions to troubleshoot the issue:

    1. Check for Syntax Errors: Make sure there are no extra characters, spaces, or missing semicolons in the code snippets you added.
    2. Code Placement: Ensure that you are adding the code snippets in the correct location within the custom code section of your Avada theme.
    3. Compatibility: Confirm that the code snippets provided are compatible with the Avada theme and are not conflicting with any existing code.

    If you continue to face issues after verifying the above points, I recommend double-checking the code snippets’ accuracy and placement. If the problem persists, you may need to reach out to your theme developer or our support team for further assistance.

    Feel free to provide more details or screenshots if needed for a more specific solution. Thank you for your understanding.

    If you have any further questions or need additional help, please don’t hesitate to ask.

    Sources:
    How to Remove Date Snippets from Search Results » Rank Math

    Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    It looks like you are adding the code in the Custom CSS or JS option of the theme. Can you please confirm if that’s the case? Please note that the filter codes provided in the guide are PHP codes so you should insert them into a field where that supports running PHP.

    You may refer to this guide instead on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how that goes.

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

The ticket ‘Errors in code snippets’ is closed to new replies.