Solved

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

Posted on 2010-11-18
2
425 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
[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
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

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…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

734 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