WordPress.org

Ready to get started?Download WordPress

Forums

Remove "post date", "author" & "reply" from search results (12 posts)

  1. GN2011
    Member
    Posted 3 years ago #

    Anybody know to do this please?

    So instead of displaying search results like this ;

    EP#41 (incl. a guest mix from Kiko Navarro)
    Posted on 19/07/2011 by grantnelson
    Reply

    01. Lucillia – Sun Goes Down (Central Avenue Soulful Latin Club Mix) – S1 Entertainment ** World Exclusive ** 02. Adele – Rolling In The Deep (Shane D Re-Work) – CDR ** World Exclusive ** 03. Lady Alma – Runnin’ … Continue reading →
    _________________________________________

    They display like this ;

    EP#41 (incl. a guest mix from Kiko Navarro)

    01. Lucillia – Sun Goes Down (Central Avenue Soulful Latin Club Mix) – S1 Entertainment ** World Exclusive ** 02. Adele – Rolling In The Deep (Shane D Re-Work) – CDR ** World Exclusive ** 03. Lady Alma – Runnin’ … Continue reading →

    Any takers?

  2. GN2011
    Member
    Posted 3 years ago #

    Sorry to bump, but anybody have an idea where I need to be looking for this?

  3. dianem326
    Member
    Posted 3 years ago #

    You might want to attach your URL to your website so someone can see what you problem is. It really does help in understand what someone is trying to say.

  4. GeorgeGecewicz
    Member
    Posted 3 years ago #

    What's your website? I can show you a super simple way to do this if I can see your website. :)

  5. GN2011
    Member
    Posted 3 years ago #

    Thanks George,

    Here's my site with a search loaded so you can see what I want to remove.

    http://www.gnhousecall.com/v2/?s=house&submit=Search

    Cheers,

    Grant

    P.S. The footer not loading problem has just appeared from nowhere, I've just made another thread about it, no idea why this has started happening as I didn't touch a thing. About 2 hours ago it was fine, when I came back and loaded up my blog it had disappeared..

  6. GeorgeGecewicz
    Member
    Posted 3 years ago #

    Usually there's ways to target search-results pages only, but whatever theme you're using isn't generating these handles :(

    If you really want to solve this, here's what you can do:

    • navigate to the header.php file in the WordPress editor. You can find this under the Appearance tab in your admin area.
    • once you're in this file, find the tag that looks like this: <body>
    • replace the <body> tag with the following code: <body <?php body_class(); ?>> exactly like that, with the question mark, two > brackets, everything.

    Let me know if you do this, then I can show you a super quick way to hide that content.

  7. GN2011
    Member
    Posted 3 years ago #

    Ahh that's great!

    I've created the theme myself so that's why there's probably tons of important stuff missing ;)

    Ok I've changed the <body> tag

    Really appreciate this George, thanks man!

  8. GeorgeGecewicz
    Member
    Posted 3 years ago #

    Cool!
    Now, all you have to do is use the same process to navigate to the style.css file, and paste this code into the bottom of that file:

    body.search-results .post .entry-meta {display:none;}

    There are technically better ways to do this within specific .php files, but this will work just as well and is easy to explain.

    Let me know if it works!

    :-)

  9. GN2011
    Member
    Posted 3 years ago #

    You sir, are a legend! ;)

    It's all gone apart from the "reply". Is there a different tag to disable that or it is turned off in the admin section?

  10. GeorgeGecewicz
    Member
    Posted 3 years ago #

    Haha, I try.

    Sure thing. Just add this as well to the bottom of the good ol' style.css file:

    .comments-link {display:none;}

    Let me know if it works!

  11. GN2011
    Member
    Posted 3 years ago #

    Booom! Worked liked a charm ;)

    Thanks once again my friend!

    One last thing if you don't mind? How do I get rid of those margins at the top and bottom of the results that are breaking the bg image?

    I'm guessing it's in the styling somewhere.

    http://www.gnhousecall.com/v2/?s=jamie+lewis&submit.x=0&submit.y=0

  12. GN2011
    Member
    Posted 3 years ago #

    Ewww just noticed something a bit weird while pasting that link above.. I've changed the form button on my search page (http://www.gnhousecall.com/v2/archive/search) from a standard button into an image using the following in searchform.php :

    <div id="searchsubmit-button"><input type="image" src="http://www.gnhousecall.com/v2/wp-content/themes/housecall/images/search-button.png" width="59" height="30" border="0" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> </div>

    And it seems to have changed the search string from the original format - http://www.gnhousecall.com/v2/?s=house&submit=Search to this new one http://www.gnhousecall.com/v2/?s=house&submit.x=0&submit.y=0

    I know this isn't anything to do with this thread but if anybody has any idea why that is happening i'd be grateful.

Topic Closed

This topic has been closed to new replies.

About this Topic