Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1279732
    sandra.i
    Participant

    Hi

    1. When I enter a phrase into the search box that doesn’t exist in the site, e.g. a misspelt word, I get this error 3 times:

    Notice: Trying to get property of non-object in /home/linweb36/r/rochesterclinic.co.uk/user/htdocs/wp-content/themes/x/framework/functions/global/helper.php on line 176

    2. The formatting of the page is incorrect – I need to remove the sidebar, the column formatting, and ideally I would like the header to say: ‘Not found: “search string”‘

    Please see here:http://www.rochesterclinic.co.uk/?s=diabets

    Can you help me with this?

    Thanks

    #1279742
    Christopher
    Moderator

    Hi there,

    #1 Please disable debugging mode by adding following line in wp-config.php file :

    define('WP_DEBUG', false);
    

    In case you have define('WP_DEBUG', true); in wp-config.php file, please delete it.

    #2 Please add following code in Customize -> Custom -> Global CSS :

    .search .x-main {
        width: 100%;
    }
    .search aside.x-sidebar.right {
        display: none;
    }
    .search .x-iso-container-posts.cols-3 > .hentry {
        border-left: none;
        padding: 15px;
        border-right: none !important;
        border-bottom: 1px solid #d5cece;
        width: 100%;
    }

    #3 Copy _content-none.php from framework/views/global and put it in the same path inside child theme, open the file and translate the strings.

    Hope it helps.

    #1281393
    sandra.i
    Participant

    Hi

    That works great, thanks.

    Is it possible to change the title in the landmark header on the no results search page?

    At the moment I have this code for the search page title:

    `<?php elseif ( is_search() ) : ?>
    <h1 class=”h-landmark”><span>News: <?php echo $_GET[‘s’]; ?></span></h1>`

    How can I adapt that so say “Not found:” instead of ‘News:’ in the no results search page?

    i.e. <h1 class="h-landmark"><span>Not found: <?php echo $_GET['s']; ?></span></h1>

    #1281401
    Christopher
    Moderator

    Hey there,

    Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!

    #1281439
    sandra.i
    Participant

    ok thanks

    #1281464
    Paul R
    Moderator

    You’re welcome! 🙂

  • <script> jQuery(function($){ $("#no-reply-1279732 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>