SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple SEARCH Plugin for WP.org blog.

    Believe me it is with great trepidation that I am even posting this, but for the life of me, I can't seem to install a WP search plugin that I can have display in my sidebar, that searches both posts and pages! -and I really want one. I have uploaded both (and activated ) Search Everything Plugin and Search Pages plug in and neither one can be coaxed to my sidebar. Every time I attempt to copy the code to the sidebar, a PHP error comes up and breaks my sidebar! What am I doing wrong? Yes, take pity on me and please lead me by the hand and show me the how to's and where' froms. I am at my wits end with my selective lack of skills.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,014
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    search

    It looks like the "Search Everything" plugin hooks into the existing WP search, modifying things so that not only post contents are searched. Does your blog have WP's core search now without the plugin?

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply. I currently have no visible search function operating on my blog. I have uploaded SE plugin and it only shows up on my Admin pages. It works well, but not where I'd like it. To be honest, I don't even see the standard WP search plugin. Most bizarre.

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,014
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    search

    It may be that the theme you're using doesn't use it.
    Open the theme's sidebar.php file.
    It will (hopefully) look like this
    PHP Code:
    <div id="sidebar">
    <ul>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    ......
    add this where you want the search to be
    PHP Code:
        <li id="search">
            <?php include (TEMPLATEPATH '/searchform.php'); ?>
        </li>
    making sure it's before
    PHP Code:
    <?php endif; ?>
    </ul>
    The search should now be visible unless you're using widgets.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for this.

    I am using the same theme (Fresh Bananas) I used when with WP.com and it has a search widget that I could use then. But when I moved the blog to a hosted WP account I couldn't see how to use or activate the plug in. My sidebar code looks different. May I PM you a screen shot of the sidebar.php? Thanks!

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,014
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    sidebar

    A screenshot wouldn't really help me too much, I usually prefer to see code. I downloaded the theme and tried it. I put the search code after the closing "friends" ul tag, but it should work OK after any of the closing ul tags (or before any of the h2 tags) depending on where you want it
    PHP Code:
    <?php // H1 is hidden, but exists for semantic value and spacing. ?>
    <h1>sidebar</h1>

    <?php // Comment this out if you will not be using Pages. ?>
    <h2>Other Stuff</h2>
    <ul>
    <?php wp_list_pages('title_li=');&#202;?>
    </ul>

    <h2>Friends</h2>
    <ul>
    <?php get_links(-1"<li>""</li>"); ?>
    </ul>
            <h2><label for="s"><?php _e('Search:'); ?></label></h2>
            <ul>
                <li>
                <form id="searchform" method="get" action="<?php echo $PHP_SELF?>">
                    <div>
                        <input type="text" name="s" id="s" size="15" /><br />
                        <input type="submit" name="submit" value="<?php _e('Search'); ?>" />
                    </div>
                    </form>
                </li>
            </ul>
    <h2>Archives</h2>
    <ul>
    <?php get_archives(); ?>
    </ul>
    <h2>Categories</h2>
    <ul>
    <?php list_cats(FALSE' ''name');&#202;?>
    </ul>

    <p><?php wp_loginout();&#202;?></p>
    There seems to be a character encoding issue (the upper case E with the circumflex^ - &#38;#202; ) but hopefully this looks like what you have and it will work. Test it by looking for a word in a comment to be sure.
    Also, I don't know what version of WP the theme is compatable up to, I have 2.2 and I couldn't see a link to the admin pages.

  7. #7
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again, by a million. I am currently running WP 2.09 as my service provider doesn't have the latest PHP necessary..apparently to handle the WP upgrade. When I insert the plugin there, as suggested, I still get the error code. So darn frustrating!

  8. #8
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,014
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    error message

    What error nessage are yoou getting? The only function in the new stuff is _e (echo). So maybe the search code is messed. Hmmmm.

  9. #9
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would be right. I tell ya, if it weren't for bad luck, I'd have no luck.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •