Questions tagged [publish]

The tag has no usage guidance.

67 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
88 views

Publish post when edit post form submitted with enter/return pressed on keyboard

How do you publish posts when the post edit form is submitted with the enter/return key on the keyboard? By default WordPress saves the post in draft status. To provide some background, I have an ...
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 ...
2
votes
0answers
317 views

Save and Publish button not working after installing SSL

I'm having a trouble editing my wp page. I installed an SSL certificate and everything on the page works fine. However, when I try to edit the page through Wordpress Customizer it doesn't let me save ...
2
votes
1answer
631 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
0answers
47 views

Decide user that can publish a post

I have the users that can send posts as pending for admin approval. Is it possibile to have that the user that add this post (as custom type) may choose another user that can publish that post?
1
vote
0answers
242 views

How to switch wordpress post status between publish and schedule in MySQL?

I am writing a program to switch a post between publish and schedule For a scheduled post, I try to set post_status from future to publish, and set a past time to post_date and post_date_gmt, but the ...
1
vote
0answers
16 views

Published site reverts without changes to theme

I recently added a search bar to our website by adding a plugin and adding that plugin into the appropriate place in our theme. I also added an event listener as an attribute on an element in another ...
1
vote
0answers
88 views

“Submit for review” for updates on existing posts

My custom user group for proofreaders has access to all our posts and pages but can't create or publish new ones. I also want disallow them to publish their changes. As far as I know, Wordpress has ...
1
vote
1answer
44 views

WordPress Front end Form - Enable to Submit PHP Codes

I just create a front end form to submit posts for public persons. It works fine. I need to allow to submit PHP codes (because it is PHP tutorial site) via that form. I need to make sure it not ...
1
vote
0answers
585 views

publish_post conflicts with save_post

my plugin has a save_post hook used to save the custom fields. now I add a publish_slider hook used to change a checkbox's status(slider is a custom post type). but it doesn't work properly. the ...
1
vote
1answer
178 views

Custom save button shows 'Are you sure you want to…' dialog

I'm looking for a way to replace the submitdiv meta box (publish box) with just one simple save button. By looking at Core I see there's a simple function returning a submit button: ...
1
vote
0answers
174 views

wp_publish_post to saved draft, permalinks broken

I'm creating a system, where some custom post drafts are being prepared, and after certain actions taken by moderators it is being automatically published. So, first I create post draft like that: $...
1
vote
0answers
48 views

Controlled publishing in Wordpress

We are currently rebuilding our corporate website and I'm looking for a way to control the publishing of pages. The flow to create or amend pages would be something like this: 1) New page is built or ...
1
vote
0answers
118 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 ...
1
vote
0answers
227 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 page,...
1
vote
2answers
144 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; } ...
0
votes
0answers
14 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
33 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
44 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
43 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
24 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
32 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
14 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
0answers
23 views

post is not showing more than 3949 words

I am writing a post which is more than 5000 words. When i publish it, only 3949 words are showing and rest of them disappeared. Is there any limitation or words limit for the post ? Could you please ...
0
votes
0answers
222 views

Bulk Post update_post_meta

how can use this code for update just post_meta ? here my code : function update_all_posts(){ $args = array('post_type'=> 'post', 'post_status' => 'publish', '...
0
votes
0answers
11 views

Let user publish posts on community page

I want to create a theme that lets the user publish posts (or all posts in an entire category at once) on a certain WordPress page. The user should be able to write and edit those posts and if one ...
0
votes
1answer
80 views

Create blog post from external source and set publication date

I'm building a script which creates new blog posts from an external source. my code is as follows: // Load WordPress require_once '../../wp-load.php'; require_once ABSPATH . '/wp-admin/...
0
votes
1answer
139 views

ACF saving posts

I am trying to send an email when a custom post type is published for the first time only as it assigns that post to a person and requires the email to be sent to just that user. The user is selected ...
0
votes
1answer
679 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 ...
0
votes
1answer
60 views

calculate values from a field and insert them into custom fields when publishing or updating post

I want to parse some information from an url when the post is published. So if I enter an URL into the Title field of a post, I want to execute a php script, that parses data from that URL and enters ...
0
votes
1answer
25 views

How can I add metaboxs to Admin Bar?

Is there a way to add a metabox to the admin bar? My goal is to be able to change the categories, tags and publish date / time, status & visibility of a post on the front end of any post/page. I'...
0
votes
1answer
335 views

Send email for pending post

I've found this code that worked perfectly for notifying admin when a post is updated, but it's annoying the admin because she's getting emails for all updates and she only wants notifications for ...
0
votes
1answer
54 views

revision id is one number behind - publish_post

I am currently writing a function, where I need to get the ID's of the two latest revisions, when a post is saved. However, the revisions ID's I get is one behind - it's not the 2 latest, but the 2nd ...
0
votes
1answer
84 views

Get content of publish box

is there any way how to safely get content of the publish box? For example via some hook or filter? I wasn't able to find anything. I need to place in in some different place.
0
votes
0answers
74 views

WP-Automatic to run publish hooks

Maybe there is someone who could help me with this plugin I use. I need it to run publish hooks, so plugin WP to buffer would work. So now WP-Automatic, publishes content, but WP to Buffer doesn't ...
0
votes
0answers
136 views

Prevent scheduled post being published if date/time is past current date/time

I'm looking for a function at prevents a scheduled post being published/updated (with a popup warning or text next to the publish button) if the post's date/time is equal to or less than the current ...
0
votes
1answer
70 views

suffix title with “EXPIRED” when scheduled post has reached it's published date

I'm scheduling and displaying all my posts in the future. I'd like to somehow add some text after the post title when the publish date is reached. In effect the post will expire at the time of the ...
0
votes
2answers
535 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
1answer
45 views

Manage multiple wordpress installs (Best Practice)

Our company has multiple blogging platforms on which some of our people post on. The list of platforms keeps on growing and so keeping everything up to date can be rather bothersome. So we were ...
0
votes
1answer
521 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
1answer
52 views

Publish post and create additional posts with same content

I'm building a site which allows authors to create a custom post type, and optionally elect to create X amount of additional posts with the same content. In this case all the content is meta values. ...
0
votes
1answer
118 views

display wordpress user who published a pending post of another user

I have a custom post type, when I view my posts of this type in the dashboard I see: Title Author Date Added as well as a few more I have added My question is how can I display (like the author ...
0
votes
1answer
100 views

Publish button inside custom field group

Is it possible to move the publish button out of the publish metabox, completely remove the metabox and then put the publish button inside the custom field group? Ask if you need more information, I ...
0
votes
0answers
60 views

How can I get taxonomy terms and custom field values of a newly created post

I created a system where people can post a CPT via a frontend form. Now, a mail has to be sent out to inform about this CPT. I tried this approach, which works, but I cannot get to the custom field ...
0
votes
0answers
3k views

My page won't publish

I hit 'publish' on a page a few days ago, and it is still not appearing on the website. Can you please help me fix this? Thank you, Sarah
0
votes
0answers
274 views

Send Custom Post Notification to Followers

I am trying to modify the function below (which works great for me ) to notify author followers that the author has published a new post, but I seem to be going round in circles. function ...
0
votes
0answers
109 views

Wordpress Author Posts Review After Every Change In The Same Wordpress Post

guys pardon my english, I am new to wordpress & I have been trying to set up a wordpress website for product reviews where new users will submit their reviews for the product/products. New user ...
0
votes
1answer
134 views

Publishing VS2010 Web Solution to WordPress

I am wondering if it's possible to publish a website that I have created onto WordPress? If so, how? The site was created using VS2010. I've done some searching online, and all I've came up with are ...
0
votes
1answer
34 views

Firing page_publish where page is child page

I'm having difficulty getting a function to fire when publishing a new page. I'd like it to fire when a new page is being published or edited but ONLY when that page has a parent. Here's what I've ...
0
votes
1answer
128 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 ...