Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #17514

    Hi there, two things I’m hoping you can advise me on with the search function

    1. As the site I’m creating has no posts, I want to remove all references to this in search results. So followed instructions in previous thread and modified loop.search.php to remove this section:

    <?php _e('You might want to consider some of our suggestions to get better results:', 'avia_framework'); ?></p>

    <ul>
    <li><?php _e('Check your spelling.', 'avia_framework'); ?></li>
    <li><?php _e('Try a similar keyword, for example: tablet instead of laptop.', 'avia_framework'); ?></li>
    <li><?php _e('Try using more than one keyword.', 'avia_framework'); ?></li>
    </ul>
    <div class='hr_invisible'></div>
    <h3 class=''><?php _e('Feel like browsing some posts instead?', 'avia_framework'); ?></h3>

    <?php
    the_widget('avia_combo_widget', 'error404widget', array('widget_id'=>'arbitrary-instance-'.$id,
    'before_widget' => '<div class="widget avia_combo_widget">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>'
    ));

    and replaced it with this:

    <?php

    This worked for searches which resulted in nil results. However the original error message saying “no posts found” etc is still showing up instead if you incorrectly type in a page name in the browser. How can I remove this?

    2. I modified header.php to put a search box top left and styled it with this in custom.css (plus a couple of modifications in media queries)

    #search{position: absolute; right: 10px; top 3px;}

    It displays fine on all browsers except IE8, where the box moves right to the edge of the browser window and compresses so the search icon in the coloured box, overlays the area where you type in your search text. Can’t work out why…it’s even fine in IE7. Any thoughts would be appreciated.

    Thanks!

    Susan

    #95717

    Hi,

    I am sorry, I don’t think something you posted came through. It would be much easier for us to take a look at the site itself instead of trying to recreate all the edits and substitutions you’ve made. Please provide the link, (you can use goo.gl) to keep the url private if you want.

    Thanks,

    Nick

    #95718

    Hi Nick, here is a link to the site,

    http://goo.gl/zBp40

    Susan

    #95719

    Hi Nick, here is a link to the site,

    http://goo.gl/zBp40

    Susan

    #95720

    Hi Susan,

    You’ll want to also edit the 404 page. So both 404.php and includes>error404.php.

    The text is pretty straight forward in each so edit out the references to posts as you need :)

    Regards,

    Devin

    #95721

    thank devin, just amending error404.php worked.

    On my other question – any ideas why the search box I inserted into the top of the page is being compressed inwards in IE8. Wonder if there is a conditional class I could add here to force it to display properly?

    Susan

    #95722

    Hey Susan,

    You can try removing the max-width on that element since ie8 doesn’t understand what it is and just breaks. Something like:

    .msie8 #s {
    max-width: none;
    }

    Regards,

    Devin

    #95723

    brilliant! Thanks Devin.

    #95724

    Glad that worked for you :)

    Marked as resolved.

    Regards,

    Devin

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘removing "search posts' option when page not found and search box display in IE8’ is closed to new replies.