MicrostockGroup Sponsors


Author Topic: How can i remove the dropdown in between the search bar and the search button?  (Read 4134 times)

0 Members and 1 Guest are viewing this topic.

« on: April 23, 2013, 18:28 »
0
I've looked at CSS...by changing the width I can get it down to a small gap, but I want to remove it altogether. Help!


Leo Blanchette

« Reply #1 on: April 23, 2013, 18:34 »
0
I didn't want to make any content unsearchable - thats why its here. But you could do #searchform #select_type {display: hidden;} ... I haven't tested it, but its a trick worth trying.

« Reply #2 on: April 23, 2013, 18:56 »
0
I didn't want to make any content unsearchable - thats why its here. But you could do #searchform #select_type {display: hidden;} ... I haven't tested it, but its a trick worth trying.

no, didnt work. I put it under styles.css in the editor of the child. But thanks.

I browsed through everyone's sites a while ago...someone else removed it...maybe I can email them and ask.

« Reply #3 on: April 23, 2013, 19:32 »
0
I didn't want to make any content unsearchable - thats why its here. But you could do #searchform #select_type {display: hidden;} ... I haven't tested it, but its a trick worth trying.

no, didnt work. I put it under styles.css in the editor of the child. But thanks.

I browsed through everyone's sites a while ago...someone else removed it...maybe I can email them and ask.

Try this:

#symbiostock_main_search #select_type {
   display: none;
}

« Reply #4 on: April 23, 2013, 20:04 »
0
I didn't want to make any content unsearchable - thats why its here. But you could do #searchform #select_type {display: hidden;} ... I haven't tested it, but its a trick worth trying.

no, didnt work. I put it under styles.css in the editor of the child. But thanks.

I browsed through everyone's sites a while ago...someone else removed it...maybe I can email them and ask.

Try this:

#symbiostock_main_search #select_type {
   display: none;
}

Thanks...that didn't work either. It's ok, I will just leave it.

« Reply #5 on: April 23, 2013, 20:11 »
0
I didn't want to make any content unsearchable - thats why its here. But you could do #searchform #select_type {display: hidden;} ... I haven't tested it, but its a trick worth trying.

no, didnt work. I put it under styles.css in the editor of the child. But thanks.

I browsed through everyone's sites a while ago...someone else removed it...maybe I can email them and ask.

Try this:

#symbiostock_main_search #select_type {
   display: none;
}

thanks  :)

I wanted to get rid of that image/blog option as well..

that did it perfectly..

« Reply #6 on: April 23, 2013, 20:17 »
0
OK, that works. I had some previous changes in the style sheet above, changing the color of the outline, etc. I deleted that and added display: none and it worked. Sorry. Operator error, as usual.  :(

Thanks!
 
« Last Edit: April 23, 2013, 20:27 by cclapper »

« Reply #7 on: April 24, 2013, 13:30 »
+1
Hi guys, just saw this. I got this working with help from theruchos! But I actually edited the search form.  for some reason every CSS trick I tried gave me search errors. If anyone else has that problem this is how I did it.

You edit the searchform_symbiostock.php to make the change, now I have a copy of this file in my child theme because I made some adjustments to the header.

The lines that need to be edited are Lines 27 to 33 which read:

<select id="select_type" name="post_type" >

        <option value="image">Images</option>

        <option value="post">Blog</option>

</select>

You replace that with just one line:

<input type="hidden" name="post_type" value="image" />

That's it! I suggest maybe making a duplicate of your child theme to try it if you are unsure, otherwise just a back up and you should be fine.  Hope that helps! If you have questions feel free to message me.
« Last Edit: April 24, 2013, 13:33 by 9lives »

Leo Blanchette

« Reply #8 on: April 24, 2013, 14:06 »
0
Good call! You've just demonstrated how to properly modify page templates in a child theme. Thats exactly right! Preferred approach.

« Reply #9 on: April 24, 2013, 15:50 »
0
how do you modify the php files in child theme?

is it the proper way, moving let's say searchform_symbiostock.php into the child theme folder? and edit afterwards?

or do we in some way achieve the same thing by editing functions.php in child theme?

« Reply #10 on: April 24, 2013, 16:09 »
0
how do you modify the php files in child theme?

is it the proper way, moving let's say searchform_symbiostock.php into the child theme folder? and edit afterwards?

or do we in some way achieve the same thing by editing functions.php in child theme?

I would like tp know the answer to this as well as everytime I have tried to put a ???????.php in the child theme I broke the whole thing.  Now I have some edits in the child css and others in the parent php's  such as my patterened footer  and the translator

« Reply #11 on: April 24, 2013, 16:51 »
+1
The proper way is to copy the unedited php files (do not remove the parent theme original :) ) into your child theme folder and make edits there.  Some of these will work on their own, for example if you copy one of the home page templates it should be fine without any supporting files.

For other files you may need to copy any supporting files it calls to.  For example in header.php, on line 93 it looks for the search form (searchform_symbiostock.php):

include_once('searchform_symbiostock.php');

If you go ahead and copy the included php files as well as the file you want to changes things SHOULD work.  I say should because...well, I'm learning as I go :D

So for the footer.php, I go check out the code and do a search for "include_once" and I see that on line 34 it says:

<?php include_once('modal-login.php'); ?>

So if you copy both footer.php AND modal-login.php into your child theme that should work.  I'm actually about to try this out as the footer is my next area to tackle so I'll let you know if it doesn't work for some reason.  Again, disclaimer...I'm new at this, so if anyone feels the need to correct me be my guest!

Edit: For the Footer:

In addition to footer.php you need to copy BOTH modal-login.php and register_symbiostock.php (because modal-login.php calls for register_symbiostock.php)  The nice thing is if you miss one the error message will tell you what it is and where it's being called:

Warning: include_once(register_symbiostock.php) [function.include-once]: failed to open stream: No such file or directory in /home/cartoo11/public_html/wp-content/themes/symbiostock-child/modal-login.php on line 15

I'm still researching to see if there is a better way to deal with these includes without having to copy all the files, but for now this works.  You will probably want to make not of which files you copy that you don't actually edit so you can easily update them from the parent theme later if needed. 
« Last Edit: April 24, 2013, 17:26 by 9lives »

Leo Blanchette

« Reply #12 on: April 24, 2013, 18:39 »
0
Hi there!
Don't bother researching a way to deal with includes. The BEST way is to do a "get_template_part" function for each include. Which means I have to switch the methods around a bit so you can copy templates without having to also copy included files.

So, for now, you can be sure to check included files are ... included. But I'll make sure I replace all "includes" to "get_template_part" in the near future, making life easier for advanced child theming (like you are doing!)

« Reply #13 on: April 24, 2013, 20:53 »
0
Awesome! Thanks Leo, that's what I kept finding. I'm sure that'll make it easier in the future.  On the bright side I learned a whole bunch of new stuff while looking into it.  You really will make programmers out of us yet!

Leo Blanchette

« Reply #14 on: April 24, 2013, 20:59 »
0
I'm looking forward to seeing your first sell-able child theme.

« Reply #15 on: April 25, 2013, 02:48 »
0
Thanks 9lives, I will have another go using that method.

Leo, I think most of us are having enough trouble getting our themes tweaked for ourselves let alone making some to sell  ;D

Leo Blanchette

« Reply #16 on: April 25, 2013, 03:47 »
+1
A year from now you'll be looking back saying "wow! It wasn't that hard after all".


 

Related Topics

  Subject / Started by Replies Last post
3 Replies
2958 Views
Last post December 18, 2007, 21:55
by vividpixels
15 Replies
6133 Views
Last post May 12, 2008, 20:24
by louoates
11 Replies
5487 Views
Last post January 04, 2011, 20:47
by pet_chia
9 Replies
2624 Views
Last post December 20, 2012, 07:39
by ShadySue
6 Replies
4846 Views
Last post November 13, 2013, 21:02
by Jo Ann Snover

Sponsors

Mega Bundle of 5,900+ Professional Lightroom Presets

Microstock Poll Results

Sponsors