• Resolved wpdeals

    (@wpdeals)


    I would like to add some code to the header of my homepage but I’m running into an issue.

    When I try to add the code to the field that shows up on Edit > Page it’s not showing on the front end (it’s showing for other pages, just not the homepage).

    Any hints?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hello @wpdeals and thank you for choosing Head & Footer Code for your project.

    Please let me know a bit more about your project setup:

    1. Is it network (wp multisite) setup?
    2. What theme do you use?
    3. Is your homepage set to show static page or blog (listing) page?
    4. When you enable WP debugging, do you see HFC head code HTML comment in frontend page source?
    5. Do you have enabled any caching or code optimisation plugin?
    6. What kind of code missing on frontend homepage (css, javascript, or html)?

    It would help to see HFC settings page and homepage HFC section (screenshots).

    Kind regards, Aleksandar

    Thread Starter wpdeals

    (@wpdeals)

    Hi Aleksander – thanks for the quick reply. To answer your questions…

    Is it network (wp multisite) setup?
    No

    What theme do you use?
    It’s a custom made theme.

    Is your homepage set to show static page or blog (listing) page?
    It’s set to show a static page (it’s a home template page)

    When you enable WP debugging, do you see HFC head code HTML comment in frontend page source?
    No – I don’t see the comment but I do see the sitewide code in frontend source.

    Do you have enabled any caching or code optimisation plugin?
    Yes – WordPress Rocket.

    What kind of code missing on frontend homepage (css, javascript, or html)?
    HTML – I’m trying to add <link rel=”alternate” href=”https://example.com&#8221; hreflang=”en-us” />

    Here are screenshots of the setting page and homepage HFC section – https://imgur.com/a/qkUquDT

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Thanks for providing more details.

    I’m a bit puzzled now. If I understand well, you added desired HTML meta tag to the site-wide HEAD section and that is displayed on the frontend?

    If above is correct, on your homepage edit screenshot HEAD section is empty. Are you expecting to see something on homepage frontend?

    Please check my demo video https://drive.google.com/file/d/1kqRGKwo1SBnelD7Bte5cYRVo0HQa2s5c/view?usp=share_link

    I hope you can enable WP debugging as per https://www.ads-software.com/documentation/article/debugging-in-wordpress/ or simply add the following to your wp-config.php:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    if ( WP_DEBUG ) {
    	// Enable Debug logging to the /wp-content/debug.log file
    	define( 'WP_DEBUG_LOG', true );
    	// Disable display of errors and warnings
    	define( 'WP_DEBUG_DISPLAY', false );
    	ini_set( 'display_errors', 0 );
    	// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
    	define( 'SCRIPT_DEBUG', true );
    }

    If you did similar to my video but the code added to the homepage edit screen does not appear on frontend:

    1. Make sure you have enabled the “page” post type on HFC global plugin settings page.
    2. Alternatively, if above does not help, try with disabled WP Rocket.

    Please let me know if anything of the above was helpful.

    And don’t forget to remove WP Debug settings from wp-config.php

    • This reply was modified 1 year, 10 months ago by Aleksandar Uro?evi?. Reason: fix WP Debug URL
    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hey @wpdeals, any update on this issue?

    Thread Starter wpdeals

    (@wpdeals)

    Hi Aleksander, thanks for the follow up and apologize for not replying earlier. The WP Debug suggestion worked and our developer was able to get things working. Thanks for your help!

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    I’m glad to hear you managed to resolve reported issue. Cheers!

    Aleksandar

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not seeing option to add to homepage on main settings page’ is closed to new replies.