Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-18
2
Medium Priority
?
438 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
If you are looking for plug-ins to add functions to your WordPress small business web site, take some time to read though this comprehensive list.  These are all the plugins I use for my customers WordPress web sites, as well as my own.  Be sure to …
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

783 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