How do I remove the search box from the content area

A large search box shows in the main content area no matter which theme I use and I want to remove it, I believe I have to edit something in search.php but don’t know which lines I should remove or change. Thanks if anyone can help.

  • aristath
    • Recruit

    Hello there @Andrew, I hope you’re well today!

    The screenshot you posted is of a 404 page… When the page the user was looking for does not exist, they are presented with a search form so that they can search for the content they initially wanted to see.

    That usually comes from a 404.php file in your theme, but I wouldn’t remove it if I were you as it’s a really useful feature!

    Does that searh form also appear on normal pages on your site?

    Please advise,

    Ari.

  • Andrew
    • Design Lord, Child of Thor

    Thanks Ari – hope I’m not driving everyone nuts on here – but must admit I’m finding WP more difficult than I expected :wink:

    OK, now I’m really confused here…

    Firstly this is my test site on a sub-domain (when it’s all ready, etc, I will do exactly the same for the ‘live’ site) and initially there was just one page – the ‘Home’ page; as in index.php/index.htm. I then added a number of pages with the ‘Add page’ function and then adjusted the order in which they would appear in the menu bar by using the ‘Menus’ tool.

    If I link to the other pages then I do not get this 404 error message (although I do get the ‘page name’ displayed below the menu bar and would like to know how I stop that from happening) – the search box does not appear.

    However, from what you are telling me I have the impression that the ‘Home’ page is not loading as usual, or as you suggest, is not a normal page? How do I correct this?

    Thanks for your help once again :slight_smile:

  • PC
    • WPMU DEV Initiate

    Hey there Andrew,

    Thanks for your recent email.

    I see that its due to how your theme works. The page name you see is the entry title. Do you want to hide that ?

    Also have you added some content to your pages or not ?

    Please include a link to your site so that we can get this fixed for you.

    Cheers

    PC

    Sales &Support

  • Andrew
    • Design Lord, Child of Thor

    Hi PC,

    So the ‘Home’ page is the entry title? Well this is what I had across three different themes at least including the 2013 theme – in the end I went with this Essence theme as the menu bar is the same width as what my header image will be…

    Anyway – carrying on… There is no content yet on any of my pages including the ‘Home’ page as you can clearly see in the image I attached. The reason for this is there is no point in having any content until I know that the theme; plugins, etc, all work – I hope you understand me here…

    Don’t take this the wrong way, I’m sure that everyone on here is very honest, etc, etc – but realistically I cannot include a link to my site.

    All I want to know is how do I stop this search bar from appearing in the main content area? Incidentally, ‘Home’ does not show as a page title in the pages list, but it does show in the menu list, which is odd. Another annoying thing that happens is, that when I go to another page in the menu bar, the resulting page shows the page title beneath the menu bar – how do I stop that from happening?

    Thanks once again,

  • PC
    • WPMU DEV Initiate

    So the ‘Home’ page is the entry title? Well this is what I had across three different themes at least including the 2013 theme – in the end I went with this Essence theme as the menu bar is the same width as what my header image will be…

    Another annoying thing that happens is, that when I go to another page in the menu bar, the resulting page shows the page title beneath the menu bar – how do I stop that from happening?

    Yes it is. That is the page Title. A few themes display the page title on the page. If you don’t want that to be displayed, just add the below code to your CSS :

    .entry-title {display : none}

    Don’t take this the wrong way, I’m sure that everyone on here is very honest, etc, etc – but realistically I cannot include a link to my site.

    No worries with that. :slight_smile:

    All I want to know is how do I stop this search bar from appearing in the main content area?

    That is appearing as WordPress is not able to find out your homepage and its returning a 404.

    Can you go to Settings >> Reading settings and define a homepage there ?

    Or can you provide a screenshot of that page ?

    Please advise !

    Cheers

    PC

    Sales &Support

  • Andrew
    • Design Lord, Child of Thor

    @ PC. Thanks again for your help. Where exactly in the CSS do I add .entry-title {display : none}?

    Also, do you mean just to add this code, or do you mean replace or edit something else already in the CSS with it?

  • Andrew
    • Design Lord, Child of Thor

    For PC again… For General Settings I have as follows:

    Site Title: [ blank ]

    Tagline: [ blank ]

    WordPress Address (URL): [ subdomain.name123 ] This is not the real one though…

    Site Address (URL): [ subdomain.name123 ]

    For Reading Settings I have these details:

    Front page displays

    * Your latest posts this is selected

    * A static page (select below)

    Below the two radio buttons are the two drop-down boxes; Front Page and Posts Page.

    Other info that might help… If I select Posts Page, then ‘Home’ does not show in the drop-down list, but it does show in the Menu Structure under Menus. I hazard a guess that if all was well, then ‘Home’ should also be showing in the drop-down list.

  • steve
    • Flash Drive

    Home will not show in the list you set any page you want from the list mines call Welcome, the menu Home is just a link not accually a page.

    To see Home in that list, create a page called Home from the add page section.

    If you could send screenshots of you site settings it would help locate the problem.

  • PC
    • WPMU DEV Initiate

    Hey Andrew,

    Thanks for posting back. Sorry for the issues.

    I see that you have this issue on your test site. I am gonna need to have a look at your site to see what is going on there.

    Can you please send me your login details via our secure contact form

    1: Mark the email to my attention

    Attn: PC

    2: Include a link of this thread in the email

    3: Include FTP and WordPress super admin details.

    4: While filling the form, select “I have a different question” from the list.

    Looking forward for a response on this.

    Cheers

    PC

  • aristath
    • Recruit

    Hello again @Andrew,

    @pc is unavailable at the moment so he asked me to to take a look at this.

    On your site you’ve set your frontpage to display your latest posts, but there are no posts. As a result, it displays a 404 page.

    If you set your frontpage to display a page and select a page from the dropdown below, the issue does not occur.

    If you also add some content on your site, the issue still does not occur.

    This is not a bug, this is a normal and expected behavior in WordPress.

    To change these settings you can go from your dashboard to Settings => Reading.

    I hope that helps!

    Cheers,

    Ari.

  • Andrew
    • Design Lord, Child of Thor

    Right, so that’s why I’m getting the 404 message, great :slight_smile: I’ll setup the front page to display a page instead.

    One other slight issue that I already raised, is that clicking on a link/page in the menu bar displays the page name beneath the menu bar when I go to that page. This o.c looks odd as the page name is already shown in the menu bar. This could be a bug with the theme – I don’t know (?). Is there a way to prevent the page name being shown as a text string?

    Thanks again,

  • Andrew
    • Design Lord, Child of Thor

    What are you talking about? If you look at the preview of any WP theme a) it shows the search button to the right of the search box, and b) the page titles are not shown below the menu bar. That’s the whole point of having a menu bar with the page that you’ve gone to or visited being highlighted, right? Look at any professional website; what I call professional anyway – they don’t show the page titles beneath the menu bar because it would look stupid and almost childish! Surely there must be a standard way that you can prevent page titles being shown beneath the menu bar in WP. Also, there must be a standard way that you can prevent the search button from being shown beneath the search box. There must be, if not – then I have to say I’m not impressed with WP so far!

  • Andrew
    • Design Lord, Child of Thor

    So, you do not answer?? Where in any of these themes (https://www.google.co.uk/search?q=wordpress+themes&source=lnms&tbm=isch&sa=X&ei=Y2d4UtaAKdCM7Aadw4D4Cw&sqi=2&ved=0CAcQ_AUoAQ&biw=1024&bih=679) do you see the page title in BIG BLACK LETTERS or any sized letters for that matter beneath the menu bar? Where? That’s the whole point of having a menu bar, so that you see the page title in the menu bar. Jeeeez!

    BTW – I have since discovered that the font size on the home page of the Essence theme is smaller than on the other pages, on top of everything else!

  • PC
    • WPMU DEV Initiate

    However, if I cannot prevent page titles from being shown beneath the menu bar, then can I at least reduce the font size? Probably in the CSS somewhere? I’ll have a look – thanks!!

    Hey Andrew, yes you can hide that via CSS. Which theme are you using ? Can you send me a copy ?

    do you see the page title in BIG BLACK LETTERS or any sized letters for that matter beneath the menu bar? Where? That’s the whole point of having a menu bar, so that you see the page title in the menu bar. Jeeeez!

    Well, every theme has a different way of showing things. Different font sizes etc. So its not the point of using any theme or those displayed in your search result links above.

    I tried visiting your test site so that I can suggest the CSS but sadly that doesn’t work. If you could send me a link privately where I can see your pages, I can quickly suggest you the right CSS to hide the large title bar which appears below the menu bar.

    Cheers

    PC

  • Andrew
    • Design Lord, Child of Thor

    For PC… Don’t really understand here. So with the login info, etc, that I gave you, you weren’t able to look at the CSS, PHP’s? How did this not work?

    BTW – I googled ‘how to reduce the font size for page titles in WP’ – or something similar, but CSS editing suggestions that I read didn’t work either as I couldn’t find a CSS clause that exactly matched the example/s given, so something told me that there was a fault with the theme. So, I got in touch with the theme developer and they told me that they hadn’t updated it for some years and that I should look for another one – at least they were honest… The theme was the Essence one.

    Aside from that, I also had a suspicion that maybe the WP installation had been corrupted – so what I’ve done since is; I deleted the mysql db/WP and the subdomain, then I created a new subdomain for the test site and re-installed WP. So I’m back with the 2013 theme.

  • Andrew
    • Design Lord, Child of Thor

    @ Ari,

    Nope, not really – I’m now looking to do one of two things. Either find a new theme that is stable, or to modify the default theme. Then I can look for the CSS clause that determines the font size for page titles.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.