is_search() is going to return TRUE on every search you perform, so that won’t do what you need if I understand correctly. You’ll have to use a post_type conditional tag. But it shouldn’t be too difficult with something like
if (is_search()) {
if (get_post_type() == 'type_1') {
//Do the right styling
} else if (get_post_type() == 'type_2') {
//Do different styling
}//endif
}//endif
etc etc
Hopefully that’s what you’re looking for.
Related Posts:
- Manual excerpts for pages not working on Search
- Custom Search Page Pagination Not Working
- When I split a large post with , how can a search locate users to the correct page?
- Form action redirect to the same page
- Two Search pages, One search form
- How get get list of pages in ajax search
- Getting to a specific page on website using specific code instead of navigation bar
- Search child pages from a specific page parent
- Add Filter to Ignore a Post/Page or a Number of Post/Pages
- Search results to be only posts & children of page ID
- Search anything from a Child and Sub-Pages of their Parent page
- Add pagination to search.php page
- Search Page: activate html code if the tag is on the page
- If searched in a category show different 404 page
- Search page different title per results
- simple category search form returns full text – but I need excerpts
- How to enable automatic search results in WordPress
- Save search criteria per user and show on custom user page
- Create a page without adding a page in the Database
- Restrict admin access to certain pages for certain users
- Require title for pages
- Add a new page to wordpress programmatically
- Get Permalink for the top level parent of child pages
- Get page id by title?
- List all pages and children in separate ul
- How do I load custom scripts and styles for a page?
- WP won’t save changes in post (any)
- Call the content of a page in AJAX in WordPress
- Password Protected Page Not Displaying Content After Entering Password
- Created pages not showing up in ‘All Pages’ list
- Registering multiple sidebars with data from an array
- How to exclude shortcode from specific page IDs if it’s set to global
- How to dynamically save a selected option from page “Templates” selectbox?
- Play Video on Homepage Only
- Extra title output with this function wp_list_pages
- Dynamically change page that loads
- Page title not showing up
- Where is the key _wp_page_template passed?
- Private Posts/Pages & Search
- How to add Posts to a Page
- remove/hide pages from users backend
- Page not found error when adding text `2 = 2 ^ 1` to the page
- Related Links Page with moderated, user suggested link submissions
- If a page does not exist, include a different page?
- Missing Page, But Still Exists In Preview
- Adding Author and Updated Schema Markup to WordPress Static Pages
- Trying to Edit a Page but it sends me to a Product Edit page
- Dynamic Landing Page
- Creating a dashboard menu page similar to the “Pages” page
- Get $post Object from another page
- How to edit a HTML list in WordPress?
- Is it possible to activate page template without manually selecting it in wp-admin?
- All Pages visible on the Frontpage
- How do we exclude multiple pages (like opposite of is_page)
- Create page template with some static contents
- Can I schedule my site to launch at a set time and date?
- If I use a static page-slug.php for a page, is the database still queried?
- Avoid pages losing template association on site re-deploy
- Group search results by category
- Using page-something.php as static front page
- Get all children titles of a page as a link to them
- Two different pages that share the same content?
- create 2 custom columns in page edit in Admin panel
- Having a series of pages created based on records in a table with fields populating the pages
- How should I set up a Tumblr blog at a WordPress Page?
- Hide links to pages that dont have any content
- custom page templating in WordPress
- WordPress – Retrieve a Page if it’s a direct descendant of another Page
- After creating a new page, filling the page with structure
- Identify that a page is a grandchild page
- Page Slug Won’t Change – Can’t Edit Archive Page With Slug or Reassign Slug
- accessing the Admin page
- Cover block always has margin
- When I enter password, I’m redirected to the WordPress login form
- How do I add a new item to this menu on the Add New Page section?
- how to change permalink for dynamic page without 404 error
- My English homepage will not update
- Problem with deleting a “Page”
- Display different pages based on form entry
- Adding styles/scripts to specific page
- when clicking update after page editing it returns this page not working in wordpress
- Maximum number of characters in a wordpress page?
- Managing many pages on a WordPress website
- How to get sort content by page id?
- Avada Theme – Display results from a specific category [closed]
- Multiple pages to show posts
- How to finish this loop?
- Page can not be updated and disappeared in “show all page”
- All the pages are blank [closed]
- Page specific values in widgets
- Woocommerce – Making product pages child of shop
- Show different number of posts on second page of category
- Use get_posts() with ‘post’ and ‘page’ queries at the same time?
- appearance of new page
- How to read a page’s “Shortcodes” from the Template File?
- For some reason my posts are not showing up on my front page [closed]
- How can I make a search term redirect to a page
- How to customize the author page in wordpress?
- User profile in front-end
- custom css in one page