Any Wordpress plugin to search posts by category? - wordpress

I am developing a website for an auto dealer. On the homepage and maybe even in the sidebar I would like to place a search function which will allow the user to search for cars according to Make (e.g. BMW) and Model (e.g. 1 series). Then a page with results will show up. Users can either search by make only or both.
Is there a plugin or code that can do this?
Each Make will be a POST category and model either under parent category (daughter) or as a tag?

Have a look at: http://wpadvancedsearch.com/. It does exactly what you want.

Related

Show/Order custom content in Main Page Summary

I am developing a site using Ubercart that shows product summaries on the main page (I believe these are called teasers). Each product has a voting widget provided by Vote Up/Down on its actual node/page. I've copied page.tpl.php to page-front.tpl.php because I want to add a small block or box that shows the number of upvotes on the main page (but not actually allow voting here) and finally sort these teasers by popularity (number of votes).
I can see that print $content is outputting this page's content but I am not sure where this is being generated so I can either hook into it or modify directly. I've coded themes and plugins in Wordpress but I don't know Drupal well enough yet.
Thanks in advance.
You should first know what is generating your front-page. Is it Views? Or another module?
If it's Views, you can easily add the vote count from the Drupal backend. If it's another thing, depending on what it is there are ways to change the output.

Post privacy in Wordpress

Can a post be hidden from home page, archive view, category lists etc. and viewable only if you have a direct link to it? The blog doesn't have registered readers and is open to public so that would be a mean of hiding some posts from public view without using the password protection.
I asked this question in Wordpress section and the idea there was to use conditional code so I'm asking the question here as well to get closer to the code.
If I used conditioning, would I have to input each post's ID separately to PHP file for archive, categories, search and such?
EDIT:
After reading a bit more all over, I had an idea of creating a private category and then use some kind of conditioning so that posts from that category are hidden. According to Codex, certain category can be hidden from, for example front page but I don't know if there's a way to hide it altogether except when you have a direct link.
Creating a "Private" category is a good solution. It is quite possible to hide this category altogether except via direct link. You just have to "block all the exits" with conditional code.
The default WordPress theme displays posts via the Post Loop. See http://codex.wordpress.org/The_Loop, especially the section entitled "Exclude Posts from Some Category". Just find all the places in your theme's PHP files (e.g. index.php) where this loop is used, and add the conditional code. You'd also need to filter your category list and blog archives in the side menu. Don't add filtering in single.php, otherwise the private post won't display on its own page.
You'd probably want to add a similar condition to filter search results so that private posts aren't leaked via the blog's search tool. There may be more "exits" I haven't thought of, but I'll be sure to update as I do. I'm glad to look at specific code if you so desire.
Understanding WordPress' post query and loop really opens up a world of possibilities for customization.
I found the simplest way - just use Simply Exclude Wordpress plugin. It has the option to exclude each post (or tag, for that matter) from front page, archive, search or feed. It works flawlessly. You can still view the posts by using direct links.
(Not actually an answer that includes code but a working solution nonetheless.)

Advertisement Manager - Dynamic Google DFP for WordPress

I am to be soon developing a number of websites with dynamic ad models using Google's DFP service. Ideally I want to develop these websites using WordPress, I was wondering if there was any tips or brilliant plugins to allow me to show generic ad units and specific ad units on different categories, pages and posts in certain categories?
I need a default generic set of advertisments to appear in a few predefined ad slots for example: 2x MPU, 2x Leaderboard etc..
These need to change depending on what category or page you are on. The same ads need to show on posts that come from it's parent category, the same applies for sub-categories and pages with sub-pages.
There seems to be no solution out there! Just simple plugins to stick adsense codes into posts randomly it seems..
There is no Wordpress plugin that allows different custom HTML to appear depending on what category the user is on.
Please refer to http://codex.wordpress.org/Function_Reference/is_category or ask me to make a Wordpress plugin for you.
Best way is 'create custom module/plugins'
This solution is only useful if you are not using category description any where.
you can add you advertisement code in category description, if current category has not ADV code then check in parent category ADV code, continue until root category.
For pages you can use custom field.
Here is a WordPress plugin that may be useful for you: http://wordpress.org/plugins/ad-code-manager/

Page Template Custom Options

I have a little question. I am making a wordpress template that uses custom page templates. Now i ran into a problem. I want to create a page with a intro text and blog posts that come from a certain category. When a user creates a new page, I want them to be able to select the category from witch the posts are shown. Kinda like a drop down box with category's from where they can select the category they want. Does anyone maby knows a tutorial where I could learn how to do this ?
I mean something like this: http://imageshack.us/photo/my-images/10/naamloosea.jpg/
I already searched google but I could only find tutorials on how to make a template options page.
Thanks in advance,
Bob
You would want to create a Meta Box to save the category as a custom field entry within Pages. In here you could list the categories within a select box. You could then use this in the page template to pull in the posts from that category as you wish. I'll see if I can dig out a decent tutorial for this.
I did a quick search and found the following plugin for WordPress that may be of use... http://wordpress.org/extend/plugins/map-categories-to-pages/

How to exclude posts in taxonomy based on custom field?

I have a custom post type called 'real-estate' and a bunch posts (listings) within it. What I'm trying to do is create a handful of home styles and within them, specific listings of available homes.
So right now, I have the search query pulling in only the home styles from the search by only showing results with the custom field "model" set as "true." However, when clicking this, I would like it to display specific homes which are apart of that style.
For example, a search query will yield Home Style A and Home Style B. When the user clicks Home Style A, it would show a general overview of the home style, with a link to an archive page of specific homes (i.e. 123 Fake St., 456 Made-up Lane) but omit the Home Style A from displaying within that query.
Right now I'm accomplishing this by creating a new taxonomy called "Home Styles" and categorizing them as such. I'm displaying only the model homes by querying only posts with that custom field I mentioned above. That part is working fine. However, when I click the link to display the rest of the homes in that taxonomy (/model-homes/model-home-a/) it shows all posts within that taxonomy, including the model home listing. Is there a way I can exclude the model homes from the taxonomy archive similar to the way I'm only including them in the search? I'm hoping theres a solution to make it dynamic by editing the taxonomy-home-style.php instead of doing it for each term in case new ones are added frequently.
Hopefully this makes sense, I've been trying to wrap my brain around the concept for hours now and trying to think of the best solution to accomplish this. Thanks.
Nevermind, figured this out on my own. I made it more complicated than it was.
I used the method on this site to edit my taxonomy-model-home.php. Adding two lines of code and it works!
http://www.solo-technology.com/blog/2007/09/08/how-to-another-way-to-exclude-posts-from-the-front-page/

Resources