Questions tagged [publish]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
657 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 ...
1
vote
1answer
2k 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
101 views

HELP: Integrating WP with raw PHP code once published button is hit

Hello guys let me just open up, I am not good in both Wp coding, I will like to integrate my wp site so that once the published/update button is hit, it will automatically import external mp3 file to ...
0
votes
0answers
11 views

Update main post with same category when creating custom post to update the modified date

I have 2 post type, so i create post on my main post type, then i need to create another post to fill the content to my main post in custom post type. Is there any way to update my main post publish ...
0
votes
1answer
595 views

Get publish post link?

Is there a way I can call a link so when clicked it publishes the post via the ID I provide? I have get_delete_post_link( $postID ) set fine, and would like to do the same to make a draft go to ...
3
votes
2answers
2k views

I can't preview post's change once they are published

The preview function works fine when posts are just draft. The url looks like this : http://exemple.domain.com/blog/?p=12&preview=true Then when I pubish my posts, let's say I want to change ...
1
vote
1answer
43 views

Check if checkbox is marked on publish/update post

Updated with working code here: add_action( 'acf/save_post', 'fritlaeg_artikel_3m' ); function fritlaeg_artikel_3m( $post_id ) { if( get_post_meta( $post_id, '...
0
votes
2answers
1k views

Add new post using a page inside the website

I have been searching for several hours to find a way to embed the "Add New Post" inside a page in the front end. I read this post but sadly no answer to it. I have embedded the login form in ...
0
votes
0answers
40 views

How to change the Publish button text in Gutenberg editor

I want to change the Publish button text to Submit in WordPress Gutenberg editor. How can I do this? Added filter gettext and replaced the text. But this is reflecting only on the old editor ...
0
votes
1answer
609 views

Access post meta just after publishing

the following code is supposed to store post meta of the recently published post to the variable $temp. But it doesn't, $temp is always empty. This seems to happen because "transition_post_status" ...
0
votes
3answers
793 views

What differences are there between a Privately Published post and a Draft post?

WordPress has three different post statuses: Published Pending Review Draft It also has three different visibility options: Public Password protected Private When you set a post to Published and ...
0
votes
1answer
952 views

jetpack publicize content customization

This is a twofold question : How can I customize message that jetpack posts on facebook when my post is published (select if title or excerpt are shown)? Sometimes it posts just article title with a ...
1
vote
1answer
22 views

Allow Contributor to edit published post and filter by page id

I'd like to give contributors permission to edit only some of their own published pages. I can use the following if I want to allow them to edit all of their published posts. How do I filter it ...
0
votes
1answer
29 views

My posts are getting to Auto draft when I try to Publish

My posts on my site are getting into auto-draft mode when I try to publish it. So far, I have tried the following: 1. Change the theme. 2. Disable all plugins 3. Disabled widgets using functions.php....
0
votes
1answer
20 views

Cannot access wp-admin after migration to another place

I've been working in my blog. Yesterday I made all back-ups (files and DB), i´ve changed the wp-config.php with the new user, DB name and password and I publised everything at my actual URL. http://...
8
votes
3answers
2k 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 ...
4
votes
1answer
459 views

Customize users' capabilities to change a custom post's post status

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 ...
1
vote
1answer
63 views

How to get the Tags on Publish post hook?

Requirement: On the each publish/update post, we need all tags from the post and do some functionality on that. Case 1: Create post, add tags and Publish immediately === WORKS PERFECT === Case 2: ...
0
votes
0answers
17 views

Why isn't update_post_meta saving?

I am trying to concatenate 2 custom meta fields into one, and saving it to a new custom meta field. The data of those fields is created using a frontend submit plugin that uses the default WordPress ...
1
vote
1answer
22 views

Problem With Pages Displaying

I am having a problem with any page other than my uncles home page displaying. The site was recently migrated from one host to another. The pages all show in the WP backend and are all formatted and ...
0
votes
2answers
1k views

Function added to hook “new_to_publish” not executing - custom plugin

I was creating a custom plugin which was to send certain emails based on the content/category of a post, but whilst trying to do that, I ran into some problems just getting a basic email sent out. Am ...
0
votes
0answers
27 views

How to publish a post if condition is met?

I'm trying to have my posts published when wp_posts.ID IN (list). Is it advisable to do it with an event in MySQL/MariaDB? Would it mess up the cache? Is it enough to just do SET posts_status = '...
1
vote
1answer
26 views

Post Meta Emtpy on Publish Using Transition

I'm trying to use get_post_meta with the following hook, but it's always empty. I adjusted the priority to see if that would help, but no luck. Any ideas? The post meta is definitely in the db after ...
0
votes
1answer
50 views

Wordpress get tags in “publish_post” hook

I want to get the selected tags using publish_post hook, while publishing the post. With below code, I can get only those tags which are already saved in the post. this will not work for new tags. ...
0
votes
0answers
25 views

Problem with permalinks getting reset

I'm having a problem with a website I recently published (aimga.ca). I did all of the development work on a test subdomain and everything was working ok. Then I backed up the existing site that was ...
0
votes
1answer
19 views

Modify Publish Metabox location on CPT

I've been struggling with how to do this properly and have yet to find a solution. I have a CPT with ACF fields. I can't use a front-end form because I'm synchronizing the CPT across several ...
1
vote
1answer
32 views

Custom post type suppress transition from future to publish

I've scheduled a custom post type to a future datetime. Now I won't that it will be published automatically, instead it should switch the status to draft. We use this to pulish the webinars, so we ...
0
votes
1answer
36 views

How to add published date in product [closed]

I have on my site some products. My plan is to show some deals. But I want to show also the published date of the deal, the date that i have published the deal. Like a blogpost shows the published ...
0
votes
0answers
19 views

How to update a custom post types meta box on publish

I'm trying update a meta field on a custom post when it's published, but it isn't working for some reason. My code is as follows: function add_rand($post_id){ $result = update_post_meta($post_id, ...
0
votes
1answer
164 views

Gutenberg publish date datepicker

I'm making some meta boxes to my custom posts, and i need a datepicker Is there a way to use this wordpress datetimepicker but without the time?
0
votes
0answers
393 views

If click on Save/Publish change Post Status to Pending Review instead Publish

Here's my problem. I need following solution. If a user is in the admin area of Wordpress and is not an administrator - and creates a page or product(via WooCommerce) - that if this user clicks on ...
0
votes
2answers
31 views

How to add publish date in the title

I learned a solution from https://stackoverflow.com/questions/36671203/wordpress-publish-date-shortcode Although it can show the publish in the title, in the source code, it still shows the shortcode ...
0
votes
1answer
16 views

After I publish a post where does it go

I did not set up my Wordpress blog. So I don't really know how to use Wordpress. I got an email from godaddy saying I am using to much space. I can delete a lot of post. I just don't know where to ...
1
vote
2answers
1k views

How to run a function when post is edited or updated using publish post action?

I want to run a function A() when a post is published and function B() when the same post is edited or updated. For this, I found publish_post action which is triggered whenever a post is published, ...
0
votes
1answer
65 views

What is happening to make my Update/Publish button disabled?

I'm really wondering... What is WP doing when it disables the Update/Publish button? It seems to happen every once in a while, and I could not say why in goes disabled sometimes for just a few ...
0
votes
1answer
34 views

How publish post from pending status

wp_publish_post() function not work correct, because need to generate url and define author. Post added via User Frontend Pro plugin. Posting via admin panel works correct.
0
votes
1answer
40 views

Send Notification after post published was working but stopped after the last WP update

I'm just wondering why this snippet stopped working! It was working before the last WordPress Update! I'm using DW Notifications plugin and work without any problem in another functions. There are ...
0
votes
0answers
55 views

How Google Indexer should only index published pages

In my wordpress site I have different posts and pages. I want that google only index those pages which are published. The 'DRAFT' pages should not be indexed by google. What is the best way to ...
0
votes
1answer
375 views

transition_post_status hook doesn't have any POST data when publish with Gutenberg [closed]

Describe the bug When placing a hook on transition_post_status I can see it fired but no POST data is available, to get that post data I have to use the save_post hook which is inconvenient since I ...
1
vote
2answers
285 views

Change the text of the publish button to Save

I am trying to change the text of the publish button to save function change_publish_button( $translation, $text ) { if ( $text == 'Publish' ) return 'Save'; return $translation; } ...
6
votes
3answers
10k views

InDesign to WordPress workflow

I'm working on a project for a monthly InDesign-based magazine that enables them to put their content online via WordPress. The current workflow is either: Copy/pasting from InDesign to a Word ...
0
votes
1answer
2k views

Hiding by default specific post status on backend list?

I created various custom post status options (like default ones: "published", "draft" and so on) and one of them is "project closed". I need to hide/exclude by default from post list in the backend ...
0
votes
1answer
199 views

Prevent publish status/date saved on transition_post_status hook

I'm using the transition_post_status to prevent a custom post type from being published based on a post meta field. It doesn't seem to work entirely, and that's where I need some help. Here is a ...
1
vote
4answers
780 views

Check if comment was successfully submited

Is there a way to check that comment was successfully submitted? I want to display some text or hide a comment form for example if comment was succesfully submitted.
1
vote
2answers
114 views

Set meta field to publish date + 2 weeks

I have a meta field called postexpiry, and I want to set the value to the publish date, + 2 weeks. So if today were October 3rd, I want the field to be set to October 17th. I was thinking about ...
2
votes
1answer
55 views

Does WordPress remove draft status automatically?

Last week our marketing team placed around 35 posts inside of draft due to some legal issues in our market. This week the same marketing team has reported that WordPress has somehow Published these ...
0
votes
1answer
42 views

Publish posts only after the condition is met

I want to add 2 posts daily, so when the first post is published it should not be published unless and until the 2nd post is published. I am confused on how to do this. I have searched about ...
0
votes
1answer
79 views

Do action for only switch status for publish_post

I am creating notification e-mail for approved post. It sends mail to author like 'your post approved'. So i am using publish_post filder. function notificationApprove( $ID, $post ) { // Send ...
1
vote
2answers
1k views

How can I schedule a PAGE to go live at a future date/time?

I have no problem scheduling posts to go live at a future date/time, but last year, when I launched my site, it crashed when I tried scheduling a static page to go live (specifically, I believe it ...
-1
votes
1answer
11k views

Return All Post from publish to draft [duplicate]

I do something error, I transfer yesterday all post from draft to publish by my user, Now how can i return all this post to draft ??

1
2 3 4 5 6