Support » Fixing WordPress » Which file to correct coding error

  • My site, http://bit.ly/10XrhjC, has Google Custom Search in the main navigation bar; however, the person who ‘installed’ the form code used the incorrect publisher id. Plus, when I do a test search, the results appear 3 times (all ads right now due to incorrect publisher id). It’s a total mess. The site just went live yesterday, so it’s not been indexed yet!

    I need to know which theme file contains the following:

    <div>
        <input type="hidden" name="cx" value="partner-pub-3102513675616909:1406658177" />
        <input type="hidden" name="cof" value="FORID:10" />
        <input type="hidden" name="ie" value="UTF-8" />
        <input type="text" name="q" size="25" />
        <input type="submit" name="sa" value="Search" />
      </div>
    </form>
    
    <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>

    I’ve been searching every file imagineable for the last 7 hours today, and am so upset! Please can someone give me a clue where I can find this code so I can edit it? You can see it in the source code from the home page.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Look in the header.php file of your theme.

    As DJDoubleXL189 said it should be in header.php, from the looks of it you should find the code near the end of that file just a little above the </header> tag.

    Thread Starter msbree

    (@msbree)

    Thanks all, but this exact code, with this partner-pub number is not in the header.php file. I need to find the file that contains the partner-pub above! 🙁

    Did they install a plugin to set this?

    This may also be set up in one of your widget areas.

    Thread Starter msbree

    (@msbree)

    No plugin – I had the header customized, and gave the developer the wrong partner-pub code. Developer is not available to assist anymore.

    I’ve tried picking through the coding using Firebug, but I am not techie at all when it comes to php!

    If there’s no plugin and no widget, it’s got to be in one of your theme files. You may need to consult some professional help.

    jobs.wordpress.org

    Thread Starter msbree

    (@msbree)

    Yes, I totally agree it’s probably in one of the theme files, but does anyone know which theme file this code might be placed in by a developer? Would someone be so kind as to take a peek via Firebug and possible give me some file suggestions?

    If not, I totally understand! I’m just trying to find out which file…I can probably handle the rest myself. Trying so hard to keep costs to a minimum!

    Thread Starter msbree

    (@msbree)

    Or better yet, does anyone know of a plugin that could search all the theme folders and files for this? I’m already using Advanced Code Editor plugin, but I can only search one file at a time, and only those files that are appearing in my WP editor, and I’ve been through all of these manually already.

    People (including me) have looked via Firebug – but that only shows the rendered HTML code. There really is no way for someone to see more from this side of the site. You might get more helpful information from the developer of that theme – http://www.woothemes.com/products/canvas/

    We don’t have access to commercial themes, so they may have more information that could be useful.

    Thread Starter msbree

    (@msbree)

    Thanks so much everyone for your help! I already have someone who will be looking through the coding to hopefully correct the problem!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Which file to correct coding error’ is closed to new replies.