Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wordpress Search Results to bring back Archive Post Only

Featured Replies

I am after returning only results for The posts archive page only.

 

So not the entire post itself just the "teaser" of the post before you read it (archive page i think?), if you know what i mean?

 

I dont want to return any info from pages.

 

I did try the "the_excerpt" however this did not return the thumbnail image or correctly formatted, so my code at the moment looks like: -

 

<!--<?php the_excerpt(); ?>-->
<?php remove_filter('the_content', 'wpautop'); ?>
<?php the_content(''); ?>

 

At the moment it working ok, but it also returns all the content from the pages etc which i dont want

 

Here is an example: -

 

www.myweddingreviews.co.uk/?s=wedding+dress

 

Notice how It has the following results returned:-

 

- For the Bride (browse a category).

- Directory

 

These are from "Pages" it brings back the whole content from these pages which i dont want.

 

What i want are the thumbnail archive posts like:-

 

- Sexy Dress

- My perfect day

- Wedding Dresses

- Perfect Bride

- Bride Shop

 

Can anyone help me out here,

 

Thanks

Paul

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.