[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to get rid of "Sorry, no posts matched your criteria." ?

Posted on 2013-12-01
7
Medium Priority
?
3,933 Views
Last Modified: 2013-12-03
WordPress 3.7.1

Hi. I have a "Sorry, no posts matched your criteria." message on the front page of my WordPress site. I cannot find any way in the Dashboard or in any of the templates to omit this message. Has anyone else encountered this problem? Has anyone succeeded in getting rid of the "Sorry, no posts matched your criteria." message?

Thank you for any advice!

Eric
0
Comment
Question by:Eric Bourland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 2000 total points
ID: 39688527
Eric,

Which theme are you using and how do you have the options in Settings | Reading set?

That message appears when WordPress can't find posts (duh).  But on the front page, that may be due to a specific setting or even a hardcoded theme option that looks for posts from specific category or custom post type that you haven't populated yet.

In terms of removal, you would either have to generate a post that satisfies the query assuming you can do so in context with the page design.  If not, you will need to change the settings and/or dive into the theme templates to remove the code that looks for posts.
0
 
LVL 3

Author Comment

by:Eric Bourland
ID: 39688540
Jason, you seem to be my WordPress guiding light. I am using OneColumn by van der Leest:

http://wordpress.org/themes/onecolumn

>>>That message appears when WordPress can't find posts (duh).  But on the front page, that may be due to a specific setting or even a hardcoded theme option that looks for posts from specific category or custom post type that you haven't populated yet.

I figured as much.

>>>If not, you will need to change the settings and/or dive into the theme templates to remove the code that looks for posts.

Yep -- I am gonna look around for something in the templates, starting with page.php. I will work with this for a while and get back to you.

Thank you as always.

Eric
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39688606
Okay, I'm out and about and can't dive into that theme until much later tonight but dive I will.

As far as looking around, don't look at page.php. That's the template for WordPress pages.  Instead, look for index.php or home.php in the theme folder and really look for use of the is_home() function.  That' soused to determine if the current user is on the home page of the site and may reference an include file or template.
0
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 
LVL 3

Author Comment

by:Eric Bourland
ID: 39688638
Dear Jason,

Well, I don't want you to spend a lot of time on this. =) I am sure you have many better things to do with your Sunday evening. Actually, I think I fixed it ... though I am not sure what I did. I was editing page.php; and I also changed a few things in Appearance | Customize. And then the "Sorry, no posts...." message went away.

I will try to recreate what I did so I can post it here as a record.

Your solution ("change the settings and/or dive into the theme templates to remove the code that looks for posts") was the right solution .... I will find out exactly what I did though.

Gotta go out for a while; will be back later this evening. Hope you are well.

Eric
0
 
LVL 3

Author Closing Comment

by:Eric Bourland
ID: 39689074
Jason ... I am not sure exactly what I did. (Which I find at once puzzling and troubling, since I am usually very careful about edits I make in any template, whether PHP, ASP, or ColdFusion.) I am pretty sure I edited something in page.php, and/or flipped a switch somewhere in the dashboard. Anyway, it is working. As always, thank you for your time and expertise. I hope your weekend was excellent and not too full of development work. Have a great week.

best from Eric
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39694693
I am pretty sure I edited something in page.php, and/or flipped a switch somewhere in the dashboard

My guess is you switched Settings | Reading away from "Latest Posts" and over to "Static Page"

In my testing, that removes the "Sorry, no posts matched your criteria" message.

The other way to do it would have been to edit the Main Index Template (index.php) and look for the following lines:

	<?php the_excerpt(); ?>
		<?php endwhile; else: ?>
		<p><?php _e('Sorry, no posts matched your criteria.', 'onecolumn'); ?></p>
		<?php endif; ?>

Open in new window


You can then modify or remove the error message in line 3
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that you've installed WordPress 2.9 (http://www.experts-exchange.com/articles/Web_Development/Blogs/WordPress/WordPress-2-9-What-to-Expect-When-Upgrading-to-WordPress-2-9.html?) on your site, you need to install some plugins to get the most out …
Do you think that WordPress is just for blogs?  Think again!  WordPress is really a fantastic all around platform that you can use to develop websites on.  Integrated into its basic functionality is the ability to create pages using your choice of a…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question