0
votes
1answer
16 views

How can add custom commands in post-new.php in wordpress

I am new here. I have a php code that create an html file and upload it inside a folder. How can i add my custom php code inside post-new.php so when the post is published to do this... Also i need ...
0
votes
1answer
19 views

How to Test a Blog Post for Update vs. Publish Status — Unique

I want to perform an action when a blog post gets published for the first time only. I do not want to take action on any subsequent update. I wrote a plug-in to do this. However, it runs the function ...
2
votes
1answer
104 views

How can I display a specific user's first published post?

I'm looking for a way to display a user's first published post using their unique ID. I have a function that calls a list of specific users using their IDs, and would like to display the date the ...
1
vote
1answer
42 views

Calling Different Custom Post Timestamps in a table

I use WordPress to run an events site that people can sign down to if they have a subscription. At the bottom of each event, if you are admin you can see a guest list with Name, Email, Tel, Avatar ...
0
votes
1answer
101 views

Prevent post from being published if no category selected

I do not want a user to be able to publish a post if no category is selected. I don't mind throwing a JS alert or handling this on the server side as well. Anyway, how can I ensure this? Note: ...
0
votes
2answers
35 views

How to handle a post before publishing?

I want to do a regex match to each post before it gets published, and if the regex fails to match, delete the post entirely, what hook should I use?
6
votes
2answers
145 views

Is it possible to Schedule Attachments in Wordpress?

As it's fairly well known, it is possible to schedule Posts in Wordpress for publishing. Also Attachments are actually Posts (in the more internal, technical meaning). So the question that bothers ...
0
votes
1answer
38 views

Publish a Silent Post without updating Feed

Is there a way to publish certain posts, silently without updating the feeds and those posts also should not appear in the home page. Appreciate your help.
1
vote
2answers
617 views

add action only on post publish - not update

I have action which adds meta field with value on post publish. Problem is that when I update post meta field is reset to default value. I already tried 'new_to_publish' instead of 'publish_post' ...
2
votes
1answer
142 views

Limit number of posts a user can make per minute?

So I found the solution to limiting a number of posts a user can make per day but not per minute. Here's an excerpt from the code I found on ...
0
votes
1answer
272 views

Notification to Admin or Author upon new post [duplicate]

I am using a custom function with 'publish_post' hook for a notification to the author when the post has been published but the issue I am facing right now is that the notification is being sent out ...
0
votes
3answers
436 views

How to give capability (publish contributors posts) to author role?

I am not a PHP programmer, just a simple WordPress user. How can I allow author role to allow publication of contributors posts? What's the technical name for this?
1
vote
1answer
272 views

Send email to user that his post has been rejected

I am searching for a solution for the following problem: I am using WP User Frontend, so that users can create posts in the frontend. After saving, the admin needs to review the post, and the ...
2
votes
1answer
497 views

When a user creates a post (pending), send a confirmation link that allows them to publish

I've got another question for you guys! I need the following thing: User creates post (automatically sets it to pending for approval) Send the user an email with a confirmation link The User clicks ...
0
votes
1answer
106 views

How can my plugin display a populated new post window

I've written a plugin that creates a feed reader like google reader in wordpress. Currently I let folks reblog feed items by using the built in WP PressThis plugin url. I pass in parameters and WP ...
1
vote
1answer
181 views

Publish Post After Click On A Link

I have a frontend posting form (CF7), where user inputs (among other data of course) his email. Now I set the status to pending. What I want is, that the user would get trough autoresponder a mail, ...
0
votes
1answer
107 views

do more action after I publish a post

I am using wordpress3.5, I need to write post information to a file after I publish a post successfully. What I am not know is When I click Publish button, what function wordpress invoke to save ...
7
votes
2answers
181 views

How to prevent posts from being published too close to each other?

I manage a blog which consists of about 25 writers. Sometimes a few of them are in the process of writing a new post at once, and they end up publishing them too close to each other. Is there a way ...
0
votes
2answers
255 views

Detect Post Type when publish_post is ran

I currently have WordPress build an XML Sitemap everytime a POST or PAGE is PUBLISHED by using this Action... add_action("publish_post", "create_news_sitemap"); I am not doing the same process but ...
3
votes
1answer
218 views

How to add a “publish” link to the quick actions

I'm trying to add a "Publish" link by the quick actions: but I'm not exactly sure of how implement it. Here's what I've got so far: add_filter('post_row_actions', function ( $actions ) { ...
1
vote
0answers
77 views

Copy post to separate database with “add_action(…)”

I'm basically trying to have a copy of a post be sent to another database's table when it's published. I've gotten it to add a new row in the new table, with my own static arguments, but I'm not sure ...
0
votes
2answers
1k views

Do action on publish or update?

Is there a way to only do a section of code on a template if the post has just been published or updated? What do I need to wrap around that code? UPDATE: I need to check if any of my custom-post ...
-1
votes
1answer
87 views

Action while post is being published

I modified the wordpress admin with a plugin I wrote, and my last problem is that there's no action anymore while the post is being updated or published in the admin. I looked around for a function or ...
2
votes
3answers
737 views

Add javascript when post is published

I am trying to add javascript when a post has been published so that it's more noticable for my user but I can't figure out what to use. I tryed with publish_post and save_post, but it doesn't work ...
0
votes
1answer
48 views

How to write a new file when new post has been published in Wordpress

I having a problam with my wordpress plugin. The plugin does whenever new post has been published, it will automaticly create a new file with that post content. this is my code function ...
0
votes
1answer
46 views

featuring old articles without messing up with the archive

This is all about featuring content in WP. Say, you got 1000's of posts that you accumulated over the years and each has their own original ( and true ) post dates. And now you want to feature them ...
2
votes
2answers
2k views

How to limit user to publish post per day and per role?

I would like to know is there any way/Plugin to limit the user published post (in a given time span) by his role? Like this: Role A -> 1 post per day and 30 post total. Role B -> 10 post per ...
4
votes
3answers
2k views

WordPress plugin to publish to multiple remote WordPress blogs

I have a WordPress (.org) blog (let's call it blog1) that is used by many authors, who may create, edit and publish posts (on blog1). Each author has her/his own WordPress blogs, hosted elsewhere. ...
3
votes
1answer
2k views

Post publish only hook?

Is there any hook which is fired only when the post is "published" for the first time. I dont want to execute my code when the post is "updated" or when its status is set to "not-published" and then ...
2
votes
1answer
399 views

In what sequence are the hooks fired when a post is “published”?

I would be grateful if someone could point out a link. I understand this may have a very lengthy answer but I searched and couldn't find any resource. Alternatively, it would also be nice if someone ...
0
votes
1answer
236 views

Display password protected posts to logged in users

In a WPMU & BuddyPress installation, I want to directly show the password protected posts to logged in users without asking them for posts passwords... and still be accessible to guests ...
1
vote
2answers
163 views

Print a message if excerpt is empty after posts have been publish/update!

I don't think I can make the excerpt required, but if anyone knows a workaround please share. At least I want to print a message if excerpt is empty after posts have been publish/update, maybe a red ...
1
vote
2answers
992 views

Elegant way to include only published posts with get_objects_in_term()?

The obvious way is to iterate through the resulting array of IDs, get_post for each and test against post_status == 'publish'. But I wonder whether this could cause memory issues since get_post will ...
3
votes
2answers
854 views

Restrict the Number of Posts an Author can Publish (over time)?

I'm thinking maybe limit the number of posts a user can make in a given period of time. (Say a user can only publish 1 post per 5 minutes?) Is there such a plugin?
2
votes
1answer
1k views

Publish pending article from front end with a button?

Is it possible to take the blue publish button in back end of the wordpress and place it in the frontend near the post in my index.php. I need a way to publish the pending article without going to ...
4
votes
2answers
687 views

How can I make it so the Add New Post page has Visibility set to Private by default?

I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default: Status: Draft Visibility: **Private** Publish immediately [Publish] ...as opposed ...
0
votes
2answers
952 views

Stop wordpress from creating empty/null entries

Fiddling around with a custom post type which is quite heavy modified. Started doing some testing to see if I had broken some function, and realized that wordpress doesn't have a function that checks ...
0
votes
2answers
101 views

I want to print a message in post “ After one month from publish date”

I need to showing message in post , but after one month from publish date. I try to make it before ask you, but I can't this is my code $publish_date = $post->post_date_gmt; ...
0
votes
1answer
204 views

How do I manage my users post before publish?

In my website , I allow to the new user to write posts. but the problem is when the user write post. the state of post is publish. it is appear in front page. I want to read it before the publish , ...