WordPress.org

Ready to get started?Download WordPress

Forums

Global Search? (45 posts)

  1. justbishop
    Member
    Posted 4 years ago #

    Are there any working options other than the WPMU Global Search (which apparently doesn't work with 3.0 and doesn't seem to be supported by the plugin author any more) or the one from WPDEV (um, I don't have $79 to spend for a 1 month membership)?

    I really REALLY need this feature, and fast. I can't possibly be the only one?

    :(

  2. mrarrow
    Member
    Posted 4 years ago #

    Google custom search, surely?

  3. http://jason.ungos.com/projects/one-search-wpmu-plugin/
    http://welcome.totheinter.net/2009/05/22/a-better-sitewide-search-for-wordpress-mu/

    Tho I normally use sitewide tags to pull in all the content and call it the "search blog". ;)

    A google custom search also works really well.

  4. justbishop
    Member
    Posted 4 years ago #

    Thanks guys, this gives me hope!

    Andrea, both of the links that I thought were to download the plugin at the first URL you gave gave me a 404. Is that one in development any more? I tried the second plugin you suggested, but the problem I'm having is that it basically takes over the normal search feature. I guess I should be more specific in what I'm actually after :)

    I need a global search that is separate from the search on my main site. I'm using the posts on the main site as a classifieds post for my members to sell their used stuff, and I'd like for people to be able to search through those items only, if they wish. Then I'd like a separate search form that lives on a different page (possibly my blogs, or in my case "shops" directory page) that would return global search results of posts only (no pages), minus posts on the main site. If I could exclude results by tag name on this search, that would be awesome, too!

    I'm totally willing to go in the direction of your last suggestion, using sitewide tags to accomplish this. That would actually take care of the "no pages" caveat, correct? I do have Boone Gorges Sitewide Tag Suggestion plugin network activated already...I have no clue where to go from there, though!

  5. justbishop
    Member
    Posted 4 years ago #

    OK, so I just installed "WordPress MU Sitewide Tags Pages" as well, but I have no clue how to get my tags blog (which I've named /search/) to pull in posts from all sites in my network :/

  6. justbishop
    Member
    Posted 4 years ago #

    OK, I feel really frustrated. I even resorted to trying a Google custom search, but that returns all sorts of unwanted pieces of info on my results page. I ONLY want search results to include POSTS (not pages) from child sites ONLY (not the main site).

    Am I the only one who feels that it's kinda stupid of WordPress to offer multisite functionality with no way to do a global search?!

  7. justbishop
    Member
    Posted 4 years ago #

    OK, not only am I now unable to delete the WordPress MU Sitewide Tags Pages plugin from my server (it was in the mu-plugins folder, and I tried deleting via FTP as well as cpanel file manager, and it keeps coming back), but now my normal main site search is broken, so people can't search the posts on my main site :(

    I'm gonna cry if I don't get help soon.

  8. justbishop
    Member
    Posted 4 years ago #

    Alrighty, finally got WordPress MU Sitewide Tags Pages deleted by submitting a help desk ticket to my host and having them do it. My normal search is still broken for some reason, but I'm working on that with the help of someone in #wordpress IRC.

    Also, Andrea, I followed the tut on your site for creating a sitewide tag page a la wordpress.com, but it still only displays the tags from the main site. What plugins do I need to have running for this sitewide stuff to work?! I'm really starting to lose it over this.

  9. Hate to tel ya, but the sitewide tags page tute used the Sitewide tags plugin. (or, if it was a really old post, it actually used a completely separate single WP install and a sitewide feed plugin)

    That plugin will not go pull exisiting posts. it will only pull posts as they are posted. To jiggle it, you can republish posts so it catches them.

    (I was out, took a day off.)

  10. justbishop
    Member
    Posted 4 years ago #

    That's ok, I was just having a really frustrating time with my main site's search, but I got that figured out :)

    Thanks for the help! So, let me see if I have the steps in this process correct:

    1. Install Sitewide Tags Pages plugin (redid this, but put it in the normal plugins folder so that i can delete it if needed)

    2. Make sure it creates the new blog (done, this worked flawlessly!)

    3. All posts published AFTER steps 1 and 2 should now show up on tags blog (this is where I'm fuzzy, but I'm about to go test the theory in a minute)?

  11. 1. Install Sitewide Tags Pages plugin (redid this, but put it in the normal plugins folder so that i can delete it if needed)

    If it is in the regular plugins folder, it will not work properly. you can try network activating it, but I do know if you just activate it on one blog, it does not work.

    3. All posts published AFTER steps 1 and 2 should now show up on tags blog (this is where I'm fuzzy, but I'm about to go test the theory in a minute)?

    Yep. provided the plugin is either in mu-plugins or network activated (fuzzy on this) AND the blogs you are posting to are public, not private.

  12. justbishop
    Member
    Posted 4 years ago #

    OK, I've got it!!

    I have a couple of questions on integrating this tag blog into the main site, though. I understand that it's a child site, but I've applied the buddypress child theme I'm using on my main site to it (and I'm gonna have to create a second version of that to change a few things, but that's nothing I can't handle), so I can duplicate the look pretty easily. My question is about widget content, mainly custom menus and a links widget that I have set up.

    My links widget is set to pull 5 links from my main site's links bank. I'd like to display links from the same links bank on the tag search site, so that I don't have to enter the links into BOTH site's links. Is this possible?

    Also, I have 2 custom menus in the footer of my main site that I'd like in the footer of my tag search site as well. I could just replicate them, but same issue as with the links widget...I'd have to add new links to BOT site's custom menus each time anything needed changing. This issue isn't as important as the links widget one, though.

    ETA: you posted back as I was posting the novel above, lol. I have it Network Activated in the normal plugins folder, and it's showing my republished posts from my test child site just fine :)

  13. My links widget is set to pull 5 links from my main site's links bank. I'd like to display links from the same links bank on the tag search site, so that I don't have to enter the links into BOTH site's links. Is this possible?

    Yes.

    Normally, I tell people just to hardcode their sidebars. :P

    But since you;re only pulling one blog over to another (and not one blog over to all of 'em) you can do this:

    just before the widget code put
    <?php switch_to_blog(1); ?>
    right after put
    <?php restore_current_blog(); ?>
    then it will always from Blog #1.

    12.

    ETA: you posted back as I was posting the novel above, lol. I have it Network Activated in the normal plugins folder, and it's showing my republished posts from my test child site just fine :)

    Sweet :)

  14. design_dolphin
    Member
    Posted 4 years ago #

  15. justbishop
    Member
    Posted 4 years ago #

    Thanks guys!! Hopefully, I won't need any more help with this :D

  16. justbishop
    Member
    Posted 4 years ago #

    OK, I got confused. Where exactly would I add the <?php switch_to_blog(1); ?> and <?php restore_current_blog(); ?> tags? Like, in what file? Where I registered the widget areas in functions.php, or in the template files where the widgetized areas are being called?

    Also, how would I pull a custom menu from blog 1 into a widgetized area on blog 12 (my tags blog)? When I drag a custom menu widget into a widgetized area, it tells me that I have no custom menus and that I need to create one.

    *headspin*

  17. OK, I got confused. Where exactly would I add the <?php switch_to_blog(1); ?> and <?php restore_current_blog(); ?> tags? Like, in what file? Where I registered the widget areas in functions.php, or in the template files where the widgetized areas are being called?

    in the template files where the widgetized areas are being called. Usually sidebar.php.

    Also, how would I pull a custom menu from blog 1 into a widgetized area on blog 12 (my tags blog)? When I drag a custom menu widget into a widgetized area, it tells me that I have no custom menus and that I need to create one.

    Do the same switch around the menu area in the theme files.

    (I haven't tested this.)

  18. justbishop
    Member
    Posted 4 years ago #

    Ok, here's what I have in my footer.php file for the theme my search blog is using, but it doesn't seem to be pulling anything. HERE is what the footer is supposed to look like, and HERE is what it looks like with the following code (I'm needing to pull the "Cloth Underground" and "Shop Owner Resources" custom menus from the main site):

    <table border="0" width="100%" cellpadding="10px">
    	<tr valign="top">
    		<td style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px;" width="33%" valign="top">
    	    <?php switch_to_blog(1); ?>
    		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer Left") ) : ?>
    
    <?php endif; ?>
    <?php restore_current_blog(); ?>
    		</td>
    
    		<td style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px" width="33%" valign="top">
    		<?php switch_to_blog(1); ?>
    		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer Center") ) : ?>
    		<?php restore_current_blog(); ?>
    		<?php endif; ?>
    <?php restore_current_blog(); ?>
    		</td>
    
    		<td width="33%" valign="top">
    		<div class="copyright">© Copyright <?php echo date('Y'), ' '; bloginfo('name'); ?>. All rights reserved.<br />
    
    	    	<a href="http://wordpress.org">WordPress</a> <b>·</b> <a href="http://buddypress.org">BuddyPress</a></div>
    		</td>
    	</tr>
    	<tr colspan="3">
    	<td>
    
    	</td>
    	</tr>
    </table>

    And I put this at the top of my index.php (for the child theme that the seach blog is using, of course), but it's not doing anything. I also tried it at the top of archive.php, but no luck there either.

    <div class="featured">
    					<?php switch_to_blog(1); ?>
    					<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Featured") ) : ?>
    					<?php endif; ?>
    					<?php restore_current_blog(); ?>
    					</div>
  19. justbishop
    Member
    Posted 4 years ago #

    GAH! Disregard all i've said since you guys gave advice last. I didn't have the correct child theme activated >.<;;

  20. (sweet site :D )

  21. justbishop
    Member
    Posted 4 years ago #

    Heehee, thanks! CU is more geared toward competing with Hyena Cart, but we're out to tempt Etsy-ers as well (hint hint!)

  22. justbishop
    Member
    Posted 4 years ago #

    One more! Any idea how I can get my recent post titles ("New on The Street") to truncate like they do on my main site?

    HERE is how I truncated them on the main site. I'm not sure how to replicate it into the following, which I used to hardcode the "New on The Street" stuff onto the search blog's sidebar.php, because this doesn't use anything like get_the_title(). I tried replacing post_title with trim_title, but that just blanked the area out:

    <ul>
      <li>
      <div id="recent-posts-5" class="widget widget_recent_entries">
        <h3 class="widgettitle">New on The Street</h3>
        <ul>
        <?php switch_to_blog(1); ?>
        <?php
          $number_recents_posts = 5;
          $recent_posts = wp_get_recent_posts( $number_recents_posts );
          foreach($recent_posts as $post){
            echo '<li><a href="' . get_permalink($post["ID"]) . '" title="Look '.$post["post_title"].'" >' .   $post["post_title"].'</a> </li> ';
          } ?>
          <?php restore_current_blog(); ?>
        </ul>
        </div>
      </li>
    </ul>
  23. justbishop
    Member
    Posted 4 years ago #

    Aaaand another :P

    Can the search blog not pull in post thumbnails? I have this code, and it's just not working:

    <?php $image1=the_post_thumbnail(); ?>
    						<?php if ( $image1 ) : ?>
    						<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?>"><img src="<?php echo $image1; ?>" width="50px"</img></a>
    						<?php else : ?>
    						<?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?>
    						<?php endif; ?>

    Also, is there any way to pull the blog name into the results?

  24. honewatson
    Member
    Posted 4 years ago #

    If you have your own server or vps I would look into Sphinx Search. It is vastly superior to any MySql based fulltext search. It can be configured so that domain ids are attributes which means you can then have global or search or filter by domain id.

    To give you an idea of how scalable it is Craigs List uses it for its millions of custom searches per day.

  25. One more! Any idea how I can get my recent post titles ("New on The Street") to truncate like they do on my main site?

    use the_excerpt in the theme's index.php file instead of the_content.

    Can the search blog not pull in post thumbnails?

    nope. not yet.

  26. design_dolphin
    Member
    Posted 4 years ago #

    Can the search blog not pull in post thumbnails?

    nope. not yet.

    @Andrea_R, @justbishop

    I'm using the Arras theme, and it uses something called featured images. Which are passed along to a 'search blog' using the Sitewide Tags Pages plugin. Take a look at that as well, maybe it can help in figuring this part out.

  27. ... because that theme uses custom fields, which SWT will pull. but not the built in thumbnails. it has to do with where in the processing the internal thumbnail code is fired up.

  28. justbishop
    Member
    Posted 4 years ago #

    @honewatson: thanks, but I think that's more than I want to get into right now! I think I'm pretty happy with the sitewide tags setup :)

    @Andrea_r: which theme should I use the_excerpt in? The one on my main blog (where the titles I want truncated are being pulled from? Just to be clear, I'm talking about the post titles under "New on The Street" in the sidebar of my search site.

    And that sucks about the post thumbnails. I guess I'll have to instruct shop owners to use a custom field instead (because it's pretty important that a photo of the item for sale in their post is shown on the search blog) :(

  29. @Andrea_r: which theme should I use the_excerpt in? The one on my main blog (where the titles I want truncated are being pulled from? Just to be clear, I'm talking about the post titles under "New on The Street" in the sidebar of my search site.

    ah, I thought you meant on the search blog in the content area.

  30. justbishop
    Member
    Posted 4 years ago #

    LOL, yeah, it seemed like there was some miscommunication there.

    And, would something like this work to at least pull ANY photo from the post onto the searchblog results? As it is now, the post author's avatar displays, which really kind of defeats the purpose of a search blog for my site!

    http://wordpress.org/extend/plugins/auto-post-thumbnail/

Topic Closed

This topic has been closed to new replies.

About this Topic