Jump to content

Archived

This topic is now archived and is closed to further replies.

mgtidwell

Adding in a Search Box

Recommended Posts

mgtidwell    0
mgtidwell

Hi!

 

I'm trying to add a search box to the footer of my website, but I'm having a hard time for multiple reasons. 

 

I used a code from wordpress to call it:

 

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">

<div><label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>

 

But I dont think that I did the right thing. It's messing up the list that I have it within...and I dont know where to point the search to.

 

The web address is: ninaandwes.com...It's on maintenance mode, so the login is admin/blue22. 

 

Thanks!

Share this post


Link to post
Share on other sites
atcdomainsolutions+    63
atcdomainsolutions

Hi!
 
I'm trying to add a search box to the footer of my website, but I'm having a hard time for multiple reasons. 
 
I used a code from wordpress to call it:
 
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<div><label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
 
But I dont think that I did the right thing. It's messing up the list that I have it within...and I dont know where to point the search to.
 
The web address is: ninaandwes.com...It's on maintenance mode, so the login is admin/blue22. 
 
Thanks!


Have you just thought about creating a custom sidebar with the custom sidebar plugin? I did that for one if my clients sites and just dropped in the default Wordpress search widget. Then on the DMS front end, add the widgetizer section to the area of the page you want the search box to appear and then select the search box sidebar you created.

Share this post


Link to post
Share on other sites
Rob    547
Rob

In the footer, the Columnizer would work better than WIdgetizer.  But you'll want an additional custom sidebar, and to create that, I recommend http://codecanyon.net/item/total-dynamic-sidebar/3287804?WT.ac=search_item&WT.seg_1=search_item&WT.z_author=zourbuth

 

It will do the trick!

  • Like 1

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
atcdomainsolutions+    63
atcdomainsolutions

In the footer, the Columnizer would work better than WIdgetizer.  But you'll want an additional custom sidebar, and to create that, I recommend http://codecanyon.net/item/total-dynamic-sidebar/3287804?WT.ac=search_item&WT.seg_1=search_item&WT.z_author=zourbuth
 
It will do the trick!

Rob

So what features would the plugin you recommend have over the Custom Sidebar one? Just curious because I use and create a lot of custom sidebars on almost all sites I build and I'm always looking for better sidebar creation plugins. May need to buy this one.

Thanks.

Share this post


Link to post
Share on other sites
mgtidwell    0
mgtidwell

Hey!

 

thanks so much for the help guys...I'm moving in that direction, however, I've run into another roadblock. Ideally, I would love for the search box to function as a box, rather than an icon that you have to click on/hover over in order to make the box appear. It seems to me like the pagelines search widget can only be that icon...

 

Does that make sense? 

 

Any tips? 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny
Hi, The Search can be changed, it only appears as an icon due to CSS. You can inspect the CSS and change it to your liking.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • John Olsson
      By John Olsson+
      Hello, i'm working on a webshop, and got this code to really boost the search within WP. But when adding this code to functions.php the front end media library search flipped totally, and not working at all, any ideas what's the problem?
      function atom_search_where($where){ global $wpdb; if (is_search()) $where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')"; return $where; } function atom_search_join($join){ global $wpdb; if (is_search()) $join .= "LEFT JOIN {$wpdb->term_relationships} tr ON {$wpdb->posts}.ID = tr.object_id INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id"; return $join; } function atom_search_groupby($groupby){ global $wpdb; // we need to group on post ID $groupby_id = "{$wpdb->posts}.ID"; if(!is_search() || strpos($groupby, $groupby_id) !== false) return $groupby; // groupby was empty, use ours if(!strlen(trim($groupby))) return $groupby_id; // wasn't empty, append ours return $groupby.", ".$groupby_id; } add_filter('posts_where','atom_search_where'); add_filter('posts_join', 'atom_search_join'); add_filter('posts_groupby', 'atom_search_groupby');  
    • Queue-it
      By Queue-it+
      HI,
      Search function doesn't seem to work. 
      When ever searching for something it redirect to the home page and add the search string to the url.
      For example searching for "cases" it would display https://queue-it.com/?s=cases
      Do you know how to solve that? 
    • MissT
      By MissT+
      Would be great to have the ability to include a search option within menus and within Splashup - is this possible?
    • balfred1345
      By balfred1345
      null When I tested Search using the search field in Navi, it throws the error as shown in pastebin: http://pastebin.com/DJ079bmy
      Is there a fix for this? If there is no fix, can you please tell me how to disable search in Navi?
      Thanks,
      Bruce
    • MissT
      By MissT+
      Hi there,
      Just wondering if there is a reason why there is no search option within Multimenu as there is with Navi - would be good if it did have it and it worked in a similar way and you could switch it off when you need to.
      Many thanks.
×