Solved

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

Posted on 2010-11-18
2
416 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
Comment Utility
<?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
Comment Utility
Just AWESOME!

Thank you very much,

Chris
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
This video teaches users how to migrate an existing Wordpress website to a new domain.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now