WordPress.org

Forums

Add to All
wp_head content not being added to home page (17 posts)

  1. larryforlife
    Member
    Posted 1 year ago #

    I installed "Add to All" v1.0.4 and added some content (below) to the Any other HTML (no PHP) to add to wp_head: section:


    <meta name="com.silverpop.brandeddomains" ... />
    <script src="http://contentz.mkt932.co..." type="text/javascript"></script>

    Note: Part of the code has been cut out and replaced with "...". Searching on "silverpop" should find this though.

    This code appears in the HTML for all the site's pages EXCEPT for the main page (home page). The URL for the site is http://test.ipc-global.com.

    Thanks!
    Larry

    https://wordpress.org/plugins/add-to-all/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Can you check if your theme's home page file has a wp_head hook. It seems like it is there in your single and page templates but not in the homepage.

  3. larryforlife
    Member
    Posted 1 year ago #

    Hi Ajay,
    Although I've been using WordPress for two years, I'm not an expert, so I'm not sure if I understand your question. Also, I am new to this WP installation. We have a custom theme (ipcglobal).

    I found wp_head in header.php for the theme. Does this help?

    /var/www/ipcglobal/wp-content/themes/ipc-global$ grep wp_head *php
    header.php: <?php wp_head(); ?>

    If not, then let me know what to search for, and I will try to find it.

    Thanks,
    Larry

  4. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Larry,

    the wp_head that you found in the header is correct and needs to be included. I think this is driving all your posts and pages.

    Do you know if this header.php file is used in the home page. Depending on the theme the file name can change.

    Do you have any files named here:

    https://codex.wordpress.org/Template_Hierarchy#Home_Page_display

  5. larryforlife
    Member
    Posted 1 year ago #

    Thanks Ajay. I am checking into your request. I should have some info soon. I did find this though under "Manage Themes":

    The 2010 theme for WordPress is stylish, customizable, simple, and readable — make it yours with a custom menu, header image, and background. ipc-global supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the “Asides” and “Gallery” categories, and has an optional one-column page template that removes the sidebar.

    So it looks like our theme was based on 2010.

  6. larryforlife
    Member
    Posted 1 year ago #

    The link you provided has a lot of things to check for. I'm not sure exactly what to check. I found front-page.php, but it's under the twentytwelve sub-directory, so I don't think it's being used. I found index.php and confirmed that it is being used. Should I modify this? If so, then what should I add?

    Thanks,
    Larry

    srikumar@ip-10-0-2-45:/var/www/ipcglobal$ find . -name front-page.php
    ./wp-content/themes/twentytwelve/page-templates/front-page.php
    srikumar@ip-10-0-2-45:/var/www/ipcglobal$ ls -al index.php
    -rw-r--r-- 1 www-data www-data 418 Mar 28 08:08 index.php
    srikumar@ip-10-0-2-45:/var/www/ipcglobal$ cat index.php
    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    /*
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );
    */
    srikumar@ip-10-0-2-45:/var/www/ipcglobal$

  7. larryforlife
    Member
    Posted 1 year ago #

    I found wp-blog-header.php (which calls wp-load.php) and wp-load.php too.

    srikumar@ip-10-0-2-45:/var/www/ipcglobal$ ls -al wp-blog-header.php
    -rw-r--r-- 1 www-data www-data 271 Mar 28 08:08 wp-blog-header.php
    srikumar@ip-10-0-2-45:/var/www/ipcglobal$ ls -al wp-load.php
    -rw-r--r-- 1 www-data www-data 2359 Mar 28 08:08 wp-load.php

  8. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Larry,

    Do you know what the name of the theme is? If so, you need to be only checking within that themes folder. I assume this is (ipc-global)

    Do you have a home.php or front-page.php in this folder?

  9. larryforlife
    Member
    Posted 1 year ago #

    You are correct: It is ipc-global. It looks like I don't have either file in that directory:

    srikumar@ip-10-0-2-45:/var/www/ipcglobal/wp-content/themes/ipc-global$ ls -al home.php
    ls: cannot access home.php: No such file or directory
    srikumar@ip-10-0-2-45:/var/www/ipcglobal/wp-content/themes/ipc-global$ ls -al front-page.php
    ls: cannot access front-page.php: No such file or directory

  10. larryforlife
    Member
    Posted 1 year ago #

    Hi Ajay,
    I copied front-page.php from the twentytwelve theme to the ipc-global theme. My snippet is now being inserted into the home page. The bad news is the home page looks a lot different from before. See for yourself:

    http://test.ipc-global.com
    http://ipc-global.com

    I'm not sure what file to modify/move/etc to get it to work correctly.

    Thanks,
    Larry

  11. larryforlife
    Member
    Posted 1 year ago #

    Another update. I found part of the missing homepage (homefooter.php).

    I added "<?php include (TEMPLATEPATH . '/homefooter.php'); ?>" to front-page.php, but it didn't seem to do anything though. :(

    root@ip-10-0-2-45:/var/www/ipcglobal/wp-content/themes/ipc-global# grep Seeing *php
    homefooter.php: <h2>Seeing is Believing - Download QlikView Now!</h2>
    sitemap.php:

  12. Seeing is Believing
  13. root@ip-10-0-2-45:/var/www/ipcglobal/wp-content/themes/ipc-global# grep homefooter *php
    index_14_03_13.php:<?php include (TEMPLATEPATH . '/homefooter.php'); ?>
    index.php:<?php include (TEMPLATEPATH . '/homefooter.php'); ?>

  14. larryforlife
    Member
    Posted 1 year ago #

    I just did this:

    root@ip-10-0-2-45:/var/www/ipcglobal/wp-content/themes/ipc-global# cp index.php front-page.php

    The homepage looks normal again, but the tracking code disappeared. What do you recommend?

    Thanks,
    Larry

  15. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Larry,

    The way your theme is structured, I don't think you need to add a front-page.php at all since it would break the theme.

    Do you have a file header.php or homeheader.php in your theme folder?

    One thing is clear is that your index.php seems to be missing the tracking code. But, it could be a simple error in the theme.

    Do you think you can paste the code in index.php and the header file (if any) into snipts at http://snipt.org/

    I can view the code and suggest a change.

  16. larryforlife
    Member
    Posted 1 year ago #

    Hi Ajay,
    I apologize for the delay in responding. I just put header.php and index.php into snipt.org. I made them both private, and my twitter handle is LarrySchauerIPC. I'm not sure if they were checking in correctly though.

    Also, how will you be able to see the files?

    Thanks,
    Larry

  17. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    You'll need to give me the link.

  18. larryforlife
    Member
    Posted 1 year ago #

    Here you go. Please let me know if it works or not.

    http://snipt.org/box/LarrySchauerIPC

    Thanks!

  19. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Can you also add the code in homeheader.php file?

    It looks like header.php has the required code;

    <?php wp_head(); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Add to All
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic