The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
147 views

How to add correct Last update in Postings (the_modified_time)

Having little issue with following: We want to add "Last update" after making important corrections or additional text/images to existing Postings. Using following code (hardcoded) does in a way ...
0
votes
1answer
66 views

an action hook when a post reaches a certain number of views

I am using WP Post Views plugin to display the post number of views. I use: <?php if(function_exists('the_views')) { the_views(); } ?> I am creating a badge system for my wordpress site. My ...
0
votes
1answer
277 views

How to display and use all existing tags at my write-post-at-frontend-panel?

I can write and publish posts from my frontend - everything is fine. You know the backend: write-post-style, right? There it lists all existing tags. How can I display all existing tags at frontend ...
0
votes
1answer
2k views

wp_login action hook not working

I have spent many time looking for a solution to my issue, but in vain. Your help is invaluable. I am creating a simplified badge system. The goal is to increment the number of badges for a user if ...
0
votes
2answers
260 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
1answer
379 views

Update post meta on bulk edit / update

I have a small problem with a code that works most of the time. I just discovered it cannot be used when I bulk edit custom post type. If I'm on individual post page and hit publish, the custom post ...
0
votes
2answers
76 views

How to show or hide a post based on meta_value selection?

How would I go about hiding a post based on a meta_value selection done on the back end. The usual method is to just change the post status from Publish to Draft however, I want this to work based on ...
0
votes
2answers
55 views

I want my post to republish again after adding a custom field

I wanted a code in Wordpress that could allow me to republish the post every time I add a new custom field. For example, if I already have a post and wanted to add an update to it; I want it to appear ...
2
votes
1answer
417 views

Why does publish_{custom-post-type} fire on update?

I'm trying to fire two different actions on both publish and update. Neither should ever fire at the same time. The problem is that publish_pm_task is getting fired on update and save_post is never ...
1
vote
2answers
61 views

Make the Status, Visibility, or Date fields opened by default in the Publish box

By default, the Status, Visibility, and Date fields in the Publish metabox are closed, and you have to click Edit to show them. Is there a way to make these fields visible by default? The hidden ...
0
votes
3answers
207 views

Default pages to be unpublished - possible?

Is it possible to change the default status of every new page created to be "unpublished"? We want to have someone help us add pages to a site, but not have them show up by default until it is (all ...
2
votes
1answer
177 views

Scheduled Posts and wp-cron - Why don't scheduled posts publish if too old?

I notice that the documentation for wp_schedule_single_event mentions the following:- The action will fire off when someone visits your WordPress site, if the schedule time has passed. However ...
0
votes
1answer
96 views

Showing the next post's title, even if it's an unpublished post

At the bottom of each post I need to either: Offer a link to the next post (if the next post is published); or Display the title of the next post with the date it will be published (if it's a future ...
0
votes
3answers
93 views

How to hook into publish_posttype?

I'm trying to hook into WordPress publish. The code below is what I'm using, but it doesn't appear to be running. I have it in a plugin file that I deactivate/reactivate each time I make changes ...
2
votes
2answers
688 views

How can I add a jQuery OnClick event to the Publish posts button?

I want to add a simple confirmation event to the Publish posts button, so when my client hits "Publish" it will ask him if he's sure, to which he clicks "Yes" or "cancel" and the post then publishes ...
0
votes
1answer
988 views

How to change post status in hook?

I have similar problem as described in How to trap "Publish" button to check for meta box validation? Answer there is to hook into save_post and change post type. How can I do it? I try to ...
0
votes
1answer
423 views

publish_post action hook not working

I've got a really simple problem here, and i'm sure that the solution is going to be really simple. Here is the code: function the_fat_lady_sings() { echo 'this plugin is a far harder than i ...
0
votes
1answer
2k views

Force Publish Future (Scheduled) Posts Immediately [duplicate]

I am trying to force publish 'future' or 'scheduled' posts, and I am having trouble The reason I am asking is because I am creating a site that allows users to do the editing on the front of the ...
1
vote
2answers
238 views

get_terms on save_post hook

Usually, if I want to check for some attribute of the post I'm about to publish, I will check like this: $post_title = $_POST['post_title']; post_title is the name of the title field in the edit ...
0
votes
1answer
78 views

i am making text changes on my page show in preview not on live site, why? [closed]

I go into the admin back room on my site make text changes and hit preview changes and they show up, but when i go to the live site, they don't show at all. What am i missing, what should i be doing? ...
1
vote
3answers
265 views

Editing Screen: Make Update or Publish Button Follow The Page

The Problem: I am currently in the finishing stages of a premium theme I've been developing and all is mostly well. For pages I have a few custom meta boxes for adding in slideshows and other ...
0
votes
1answer
242 views

Publish page by invoking submit via jQuery

I'm looking for a solution to a bug that occured in an answer to an earlier question. The general idea is that I want to invoke submit on the post form and have the page published. What happens now ...
1
vote
3answers
356 views

How to access the post meta of a post that has just been published?

I am using the hook publish_post to run my code where I need the post meta of the just published post. But the post meta value I am looking for is somehow not available at this point of execution. On ...
0
votes
1answer
780 views

Check if post id exist in table than only update instead of inserting new row

I am trying to add simple view counter for my advert and everything seems works fine with below code but only it is inserting each time new row on post "Update". What I want if the post id is exists ...
1
vote
0answers
78 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 ...
5
votes
4answers
163 views

Display a post's publish date from 2112

So I am making a news website about the future, 2112 to be specific (hello, critics). I wanted to display a post's date to be from 2112. But when I try to do this from the admin panel, it 'schedules' ...
-1
votes
1answer
210 views

Can't publish posts, Jetpack won't connect, empty notification emails to my inbox

I own a self-hosted Wordpress blog and I am experiencing a lot of issues: Jetpack stopped working and it won't connect: verify_secrets_missing : The Jetpack server encountered the following client ...
4
votes
3answers
128 views

How to let authors revise other authors drafts, but keep them from publishing?

I want to give all authors permission to edit other authors drafts, but not publish them. It seems like the only way to give authors access to drafts by other authors is to grant them ...
0
votes
1answer
79 views

Change Post and CPT author on the fly while publish the post

I am developing my site and require to change post author id on the fly while publishing. All post will be write and publish by admin but as content provided by different author and need to change ...
4
votes
1answer
355 views

Custom post type capabilities

I've got a somewhat unique scenario that I would appreciate some assistance with. I have a custom post type, coin, for content that is automatically created by an custom import process. I would like ...
0
votes
1answer
94 views

Plugin that generates a page of post content

My script is generating a duplicate post even after I explicitly state that the post_type should be a page. It also ignores the $post_title, which I do not want to create a duplicate post if the title ...
1
vote
0answers
78 views

redirect deleted / drafted pages

A client asked me to unpublished a page, which I did. However, I kept it as a draft, just in case they wanted to republish at a future date. My issue is that anyone with this link will hit a 404 ...
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 ...
2
votes
1answer
283 views

Unpublish all posts in a category

I have a category with about 3.500 posts. 2.500 are not published, but saved as drafts. I want to unpublish all the remaining 1000 posts from this one category. Maybe I will want to delete all of the ...
0
votes
1answer
283 views

Remove “minor-publishing” div from Publish admin metabox

I want to remove the #minor-publishing div from the Publish admin metabox. I came across How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button and ...
0
votes
1answer
343 views

SQL: Search query to get attachments only of those parents which are published

i'm having some problem creating nice 1 query to be able to get search results which includes NOT only post_type POST but also attachments. BUT if search query return attachment, i want that it won't ...
-1
votes
1answer
88 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
750 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 ...
0
votes
1answer
41 views

Check if there is an post to be published in future

I need to check if there is an post to be published in future. I want to use WP functions, no directly access to database via mysql_query. Has anyone some sample of code?
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 ...
0
votes
1answer
136 views

Edit the Publish Widget Options

Another noob question - under the 'Publish' widget in a default vanilla installation of WordPress 3.3.1, we would like to 'simplify' the Publish widget/ Specifically, we would like to have no 'draft' ...
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 ...
2
votes
1answer
1k views

Check before publishing, if already exist post with current custom field value

I have a custom post type with only 3 custom fields in it. $post_types = get_post_meta($post->ID,'post_types',true); $post_taxonomies = get_post_meta($post->ID,'post_taxonomies',true); ...
2
votes
2answers
1k views

How to make scheduled post preview visible to anyone?

When I write a post and schedule it for later publishing, WordPress will allow me to preview the post as if it was already published but I need to be logged in as administrator (or anyone who is ...
0
votes
1answer
239 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 ...