Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Site Functionality _ Code to search on two labels question

Posted by: Nasshorn Mar 9 2018, 10:42 AM

I am brand new to the forum and I am a total novice to HTML code but have been able to learn a little by searching and experimenting. I purchased a Template for my blog (which is on Blogger) and it has a nice menu system that pulls up posts based on a search for certain labels. Here is one of the lines in the code: <li><a href='https://scottlawfindingpixels.blogspot.in/search/label/Gear'>Gear</a></li> which obviously, as it says, searches the blog for the a post with the label "Gear". My question is; is there any way to have it look for two labels and only return posts with both of those labels, for example if I wanted "Gear" and "Tripod"?

Thanks for any help on this.

Posted by: Christian J Mar 9 2018, 11:39 AM

That looks like an ordinary link, but I suspect Blogger is doing a search before generating the linked page.

QUOTE
My question is; is there any way to have it look for two labels and only return posts with both of those labels, for example if I wanted "Gear" and "Tripod"?

No, you can't follow two links at once. Instead it would require some kind of form elements, such as checkboxes. Alas I don't know what Blogger templates offer, but I'll move the thread to the web site functionality forum.


Posted by: Nasshorn Mar 9 2018, 11:53 AM

QUOTE(Christian J @ Mar 9 2018, 09:39 AM) *

That looks like an ordinary link, but I suspect Blogger is doing a search before generating the linked page.

QUOTE
My question is; is there any way to have it look for two labels and only return posts with both of those labels, for example if I wanted "Gear" and "Tripod"?

No, you can't follow two links at once. Instead it would require some kind of form elements, such as checkboxes. Alas I don't know what Blogger templates offer, but I'll move the thread to the web site functionality forum.


Thank you Christian J. smile.gif

Posted by: pandy Mar 9 2018, 01:26 PM

QUOTE(Christian J @ Mar 9 2018, 05:39 PM) *

No, you can't follow two links at once. Instead it would require some kind of form elements, such as checkboxes. Alas I don't know what Blogger templates offer, but I'll move the thread to the web site functionality forum.


No, but it's theoretically possible that Blogger's search thing can search for two labels. I've never used Blogger and probably it can't since you are supposed to click on a label and you can only click on one. But impossible it ain't. If it is possible only Blogger knows the format needed. tongue.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)