2022 Developer Survey is open! Take survey.

Questions tagged [publish]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

Is there way to toggle the publish date display?

I am interested in changing our WP dashboard so that I can choose whether an individual Post will include the publish date or not. Is there a way to do it without a plug-in and insert code that maybe ...
user avatar
0 votes
1 answer
23 views

Could we know who published a post on WordPress?

Besides knowing the author, could we know like which user with the Editor role published a post? Is this being tracked in the db?
user avatar
1 vote
1 answer
30 views

count the total number of comments the user has received for his published posts

I want to count the total number of comments the user has received for his published posts. for example show: total comments of your all posts : 47 Is there a way to do this? Can you help me?
user avatar
0 votes
0 answers
20 views

How does redirect work when publish date changes and date in url changes?

For example I create post at 29 day, publish it. In url there is 29 day. Now if I change publish date to 28, url works with 28 day. But it also works with 29 day, just redirects to 28. I do not get ...
user avatar
  • 101
0 votes
0 answers
57 views

Can't replace Gutenberg editor's pre-publish conditions with my own

I'm trying to adapt Welcher's answer here to replace Gutenberg's default pre-publish conditions with my own - namely for requiring that a category and a featured image are set. However, no matter what ...
user avatar
1 vote
1 answer
23 views

Set post terms on post publish

I am trying to set post terms on the post, when it is puublished I use following code but is doesn't work add_action('pending_to_publish', 'oj_publish_post'); function oj_publish_post($post_id) { $...
user avatar
2 votes
1 answer
45 views

How to do conditional publishing?

I am trying to write a plugin that will stop a user from publishing (or updating) a post if a given condition is not met, for example, if the title of the post is already being used in a different ...
user avatar
0 votes
0 answers
28 views

Elementor shows 404 error when trying to edit a publish CPT post and not with draft CPT post

I have created a CPT that I want to edit with Elementor. Now when I try to edit a draft CPT post with Elementor it works fine but when I try to edit that same post after publishing it, Elementor gives ...
user avatar
0 votes
1 answer
133 views

post.php AJAX request not being called when publishing post

I am using the transition_post_status to process a post being published. I was getting inconsistent behaviour between two installations of WordPress, and I have tracked this down to the AJAX calls ...
user avatar
0 votes
2 answers
282 views

Wordpress publish_post hook not getting featured image and meta on first publish, but works on updating title

I've been struggling to find a solution for this and I don't know if it's the Gutenberg editor or if it's the hook publish_post. Hook: function api_method($post_id) { // If this is just a revision,...
user avatar
  • 103
0 votes
1 answer
34 views

I would like to send a notification email (Asana) whenever something is published (posts, pages, custom post types) [duplicate]

The code below works perfectly When I create a new post, an email is sent out to the email included in the function. I would like to know how I can send an email when anything is published on the ...
user avatar
0 votes
1 answer
162 views

How to set a Post's default visibility to 'Private' in Gutenberg?

I am trying to set a Post's default visibility to 'Private' when a user first creates the post. They should then have the ability to manually select 'published' from the sidebar dropdown once they are ...
user avatar
0 votes
1 answer
294 views

Wordpress doesn't save or publish new posts

This problem started when I wanted to create a new post. I'm using the Elementor editor, so I created a new post, set the title and featured image and then clicked on "Edit with Elementor" ...
user avatar
  • 1
0 votes
1 answer
63 views

What is the reason for the new_to_publish hook not working?

this hook should normally be triggered on new post but it doesn't work add_action("new_to_publish", "doSomething", 10,1); function doSomething($post){ global $post; $_SESSION['...
user avatar
1 vote
0 answers
9 views

Can't schedule post for another time

Very odd thing happening - suddenly, I can't click on the "Edit" link under the Publish options. That is, I can hit "Publish" but if I want to change the publishing date/time or ...
user avatar
  • 11
0 votes
1 answer
142 views

Use value from ACF to populate other fields

I am struggling with this problem. I have a group pf ACF fields and a XML file with the corresponding values. What I want is the user to be able to fill one field (with an id) and on the Publish post, ...
user avatar
0 votes
1 answer
221 views

Hook when post is set from published to draft?

Is there an action i can hook into when a post is set from published back to draft? I have tried both transition_post_status and publish_to_draft but they don't seem to work when I set the post back ...
user avatar
1 vote
0 answers
299 views

Changing wordpress publication date to ACF date and time picker date not working

This might be a long post but I want to explain in detail what I'm trying to do and what I've already done. I'm making custom forms using the advanced custom fields plugin and I need to display these ...
user avatar
0 votes
2 answers
45 views

Send email to user when I publish a new post

i want to send email only new post publish in wordpress admin when i pulish anything its sending mail to user how to restric this to only new post added to send mail to user function ...
user avatar
1 vote
1 answer
604 views

Error trying to publish immediately. Post status = future (Missed schedule error)

We have moved a to new server and now we can’t publish. At least, we can’t publish instantly. Maybe can be useful: we are using Plesk & CloudFlare. When we publish a new post, the post_status ...
user avatar
  • 161
0 votes
1 answer
162 views

Windows-hosted new site shows no preview: "Future home of something quite cool." message is displayed

I added a theme and made a sample home page. What could cause the site to display no previews or even display no changes when published? Note: I did my best to search similar previously-asked ...
user avatar
0 votes
0 answers
76 views

Limiting the Number of User Posts to Their Own Posts

I have set users to only see their own posts. But the total number of articles is still visible. Can we limit it to its own number of articles? How can it be done without plugins? related picture here:...
user avatar
2 votes
0 answers
68 views

Registration and Custom Post Types - How to synchronize information?

I am building a platform where service providers can offer their services to potential customers. Therefore, I have two user roles, one "customer" who can only create an account and read; ...
user avatar
  • 21
0 votes
0 answers
14 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 ...
user avatar
2 votes
1 answer
172 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 ...
user avatar
  • 67
1 vote
1 answer
483 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, '...
user avatar
0 votes
1 answer
187 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....
user avatar
  • 101
1 vote
1 answer
80 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 ...
user avatar
  • 166
0 votes
1 answer
77 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://...
user avatar
1 vote
1 answer
418 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: ...
user avatar
0 votes
0 answers
19 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 ...
user avatar
  • 123
1 vote
1 answer
27 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 ...
user avatar
0 votes
0 answers
38 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 = '...
user avatar
1 vote
1 answer
30 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 ...
user avatar
0 votes
1 answer
167 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. ...
user avatar
0 votes
1 answer
92 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 ...
user avatar
1 vote
1 answer
105 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 ...
user avatar
  • 33
0 votes
1 answer
43 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 ...
user avatar
0 votes
1 answer
410 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?
user avatar
0 votes
0 answers
1k 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 ...
user avatar
1 vote
3 answers
4k 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 ...
user avatar
0 votes
2 answers
533 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 ...
user avatar
0 votes
1 answer
18 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 ...
user avatar
0 votes
1 answer
360 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 ...
user avatar
  • 788
0 votes
1 answer
76 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.
user avatar
  • 11
0 votes
1 answer
52 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 ...
user avatar
0 votes
0 answers
384 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 ...
user avatar
  • 15
0 votes
1 answer
726 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 ...
user avatar
1 vote
2 answers
663 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; } ...
user avatar
0 votes
1 answer
645 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 ...
user avatar
  • 810

1
2 3 4 5 6