google custom search engine - wordpress

Discussion in 'HTML & Website Design' started by three3s, Mar 15, 2008.

  1. #1
    hi i've tried to paste the code generated by google in to my wordpress theme to display a google custom search box at the top of my right side bar. i replaced the standard wordpress search box code with the google code. what this done was left the standard wordpress box there and when you typed anything in it and hit enter, it would take me to a new page within my site with the google search box in the middle of it. as opposed to just displaying the google search box on the homepage instead of the default wordpress one.

    does anyone know what i might be doing wrong or give me any ideas as to what i should do? i'm new to all this and have no idea.

    any help appreciated, thanks.

    edit: my homepage is http://videomongrel.com - i want to stick it above the rss feed button.
     
    three3s, Mar 15, 2008 IP
  2. Spider-Man

    Spider-Man Banned

    Messages:
    2,684
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I took a look at your site and can't see any search facility, just the feedburner subscription box.
     
    Spider-Man, Mar 15, 2008 IP
  3. three3s

    three3s Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    oh yeah i took it back down because i couldn't get it to work, sorry. its back on now if you wouldn't mind having another look.

    cheers.

    EDIT: i've just been testing it and if you use a search term that is on the site itself it just uses the standard wordpress search. but if you type in something that you wont find on the site, just some randon word for example, then it takes you to a not found page displaying the google search box. no idea whats going on?

    example: http://videomongrel.com/index.php?s=random (this is what comes up if you type the word "random" in the search box. that word doesn't appear anywhere on the site so it takes you to the not found page.
     
    three3s, Mar 16, 2008 IP
  4. Spider-Man

    Spider-Man Banned

    Messages:
    2,684
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I think it's time you give up with this theme and try a new theme, look here. That theme appears full of bugs.

    Ps. There isn't a problem here. When you use the WP search, it is supposed to show all posts with that search term in the title, if no search results are found, it should say something to the effect of no search results found. I suspect the reason it is giving a 404 error is because you have removed the piece of code from search.php which handles 'not found' search results, not produces a direct 404 page not found error. There are a wide range of Adsense-ready WP themes, in fact, you don't need an Adsense-ready theme, just download any theme and integrate Adsense yourself. It'll look a lot better, and things will actually work ;)
     
    Spider-Man, Mar 16, 2008 IP
  5. Parapluie

    Parapluie Guest

    Messages:
    192
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You should replace the original codes on the right sidebar with google search code instead of putting it on file search.php

    just my 2 cents :)
     
    Parapluie, Mar 16, 2008 IP
  6. three3s

    three3s Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #6

    thanks for the reply. i've no idea what bugs are to be honest. thats what i was wanting to do in the first place, take an existing template then customise myself to arrange the adsense and everything else but i've no idea how to do it. i cant get someone on here to do it either, have to wait until i've got 25 posts to post on the design services page :(

    i'll just put up with this theme for the mean time and once i'm up to the amount of posts required i can get one knocked up by someone on here.
     
    three3s, Mar 17, 2008 IP
  7. three3s

    three3s Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #7
    ok i'll give that a try, thanks.
     
    three3s, Mar 17, 2008 IP
  8. three3s

    three3s Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #8
    hey i done this and it seems to have worked well, thanks.
     
    three3s, Mar 24, 2008 IP