Solved

wordpress: how can I show pending status on single.php?

Posted on 2010-11-18
2
423 Views
Last Modified: 2012-05-10
My theme has it's own interface for user's to enter their posts. After they enter the post, the page loops back and shows the post.

I've changed the functions in the theme to set the first post as 'pending', so I can review it.

I need to let the user know the post is pending though.

What can I put into single.php so show that the post is pending? I want to do something like this:

if (post is pending) {  //how do I code this part?
echo "Your post will go live after it's reviewed";
}

Would appreciate any help,  Chris

0
Comment
Question by:St_Aug_Beach_Bum
2 Comments
 
LVL 14

Accepted Solution

by:
Dzynit earned 500 total points
ID: 34167439
<?php 
if(get_post_status(get_the_ID() == 'pending') {
	echo "Your post will go live after it's reviewed";
}
?>

Open in new window

0
 

Author Closing Comment

by:St_Aug_Beach_Bum
ID: 34167999
Just AWESOME!

Thank you very much,

Chris
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can you send emails to checkbox selection in contact form 7 Wordpress 6 31
WordPress Madness 8 35
PHP AJAX JSON 2 78
Wordpress French and English Site 6 80
Like there are many different versions of Wordpress, there are also a handful of related side projects WordPress users should be familiar with.   All of these projects are open source and GPL licensed, which means there are few restrictions to us…
WordPress is constantly evolving, and with each evolution appears to get better and better.  One of the big drawbacks prior to version 3 was that there was no way to be able to set up a custom menu from the backend. The Old Way Adding menus is…
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 set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

821 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