Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #886726

    Hi, I am trying to add schema mark up to a single page of my website. I have created all my websites pages using the advanced layout editor. The schema mark up program I am using has told me to paste the json-ld in the head section of your html document.
    How do I do this for only one web page as I can not add it in the html text section in page builder because I used the advanced layout editor to build this page https://www.screencast.com/t/DzPSc8dWYd

    #886803

    Hey James2200,
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_schema(){
    if( is_page( 123 ) ) {
    ?>
     <script>
    //Your Script Here
     </script>
    <?php
    }
    }
    add_action('wp_header', 'custom_schema');

    where “is_page( 123 )” please change to your page id number

    Best regards,
    Mike

    #887132

    Hi thanks for your reply when I click appearance I do not see an option for editor https://www.screencast.com/t/c5uMSCyg19l

    Also, could you take a look at this screencast https://www.screencast.com/t/HkXJ60gJ9V

    #887183

    Hi,
    I see you have a security plugin, perhaps there is a setting that disables your editor?
    If you can’t find how to enable your editor, try editing your functions.php file via FTP.

    Yes, remove //Your Script Here
    and add your script.

    Best regards,
    Mike

    #887717

    I did not see an option in the security setting. Would you like credentials to look for yourself

    #888490

    Hi James2200,

    The editor is hidden by this code in wp-config.php

    
    define( 'DISALLOW_FILE_EDIT', true );
    

    You can set it to “false” and then add the code, or just add the code given by Mike via FTP.
    Best regards,
    Victoria

    #889476

    thanks for that

    #889548

    Hi,
    Were you able to use the custom_schema function above?

    Best regards,
    Mike

    #889816

    I tried adding the code through the editor option but it did not except it and said I should try manually through FTP but I am not sure about doing it that way and have decided to outsource the job

    #889818

    Hi,
    Good to hear, we will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘add schema to single page of site’ is closed to new replies.