The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
483 views

Connection lost. Saving has been disabled… (Updating Posts/Pages)

I've been developing for Wordpress for a few years now without any trouble on an old XP/WAMP development server (v1.7.4) but recently have been getting the error "Connection lost. Saving has been ...
2
votes
1answer
85 views

How do I batch create revisions of all posts?

I cleaned up an old-site from pasted tags, manually created lists, etc, and I'd like to keep the old posts as "revisions", so we can easily "compare" with the old posts and retrieve/revert the ...
1
vote
1answer
218 views

If modified on same day, show only time

I have a date on each post and comment which shows the date of placement. If I edit it, it shows me the date of the post and the modified date. That's fine, but now, I want to show only the post date ...
0
votes
1answer
24 views

Change custom post status to draft before today

I tried this code which I made but looks like I am not doing it correctly.. The main problem is my code fetches all posts ordered by meta value date, but I need to hide the posts from the date today ...
0
votes
1answer
33 views

I need to bulk update all wordpress posts on a scheduled time

I need to update all posts on my wordpress site on a scheduled time (every day). So I wanted to create a new page template which I can call everyday through a cronjob to update all the posts at once. ...
0
votes
1answer
29 views

wp_update_post behaves differently for different user role

{ "sections": [ { "section_name": "Objective", "data": "<span style=\"font-weight: bold;\">Test</span>", "key": "ref" } ] } I am updating the above JSON ...
0
votes
1answer
52 views

Setting a featured image while creating the post

I am creating a post with wp_insert_post/wp_update_post. The post should have a featured image. But to set a featured image I need the postID. The problem is I do not have any postID. What I am doing ...
0
votes
1answer
138 views

wp_update_post based function works on existing posts, but not new posts

I have a function that will update the title of the post based on an 'advanced custom field'. It works on existing posts, but not when I create a new post. When I try and save the post and check the ...
0
votes
1answer
277 views

SQL / wp_update_post: change post custom field to CPT post taxonomy

the setup is as follow: I have posts with a custom field: actor = 'tom hanks' for advanced management I created a custom post type (actors) and added "tom hanks" as a post within that actors taxonomy. ...
0
votes
1answer
72 views

Update user from external script

I am using the API code of WordPress to update some fields of user profiles but I am having some problems. When I try to save information, it is not updating unless I click twice. For example for ...
-2
votes
1answer
90 views

Unable to call a Function

I have my blog here- http://tinyurl.com/kzuv6w3 Actually Just because of this issue its been 1 year since then my blog is not Uploaded. As soon as I update wordpress It fails to call the Function. ...
1
vote
0answers
76 views

Update a post's info when clicking on a javascript button

I have a series of posts about various locations. I need people to verify if the location informaton is correct. The question is asked with two buttons for options. If "no" is clicked, they are taken ...
1
vote
0answers
104 views

Changing random post publish time for repost

I have a lot of image posts. So, on weekends I don't work for that I want to re-post a random post. I made my own code. It schedules random post with its permalink too. $time= strtotime("+10 min") ...
0
votes
0answers
41 views

Update post title from external file?

I have an external script I wrote (for admins only) that loads in the following at the top: require_once('./../wp-blog-header.php'); I'm aware that it can be a plugin, but it's just not right now.. ...
0
votes
0answers
40 views

Post author for revision not being set on update/insert

I'm trying to programmatically update a custom-type post with revisions enabled via form, and everything seems to be working fine except the post_author field for the revision is being set to 0 ...
0
votes
0answers
244 views

wp_update_post not working

I have the following code in a single script to be run one time to fix post names which are empty. // WP_Query arguments $args = array ( 'post_type' => 'books', ...
0
votes
0answers
21 views

When click Update button all changes are lost

when I update the slider on my site's home page and click preview changes, I can see the changes. But when I click Update everything is lost. What causes this? How to solve this? Any suggestions will ...
0
votes
0answers
155 views

Programmatically schedule post with wp_update_post function

I schedule posts in a wp plugin (WP 3.8) with the following function. My posts seem to be in the correct status after scheduling them (when editing them, date time and status are good), and also after ...
0
votes
0answers
103 views

Function working in single.php but not working in custom template file

I defined in my functions.php the following code: function fix_footnotes($content){ return preg_replace('/href\s*=\s*"[^"]+(#[^"]+)"/','href="$1"', $content); } When I call this ...
0
votes
0answers
25 views

How to create posts with a specific date in bulk

I need to import posts with a specific date. They way I am doing it now is I import as draft, then I use php to publish, then use php to change the date. The problem is that if I make a mistake in ...
0
votes
0answers
40 views

publish posts immediately when updating

i'm looking for a way (maybe a plugin) to have a choice of just updating an already published post, and updating and republishing it with a current date and time basically, two options when editing: ...
0
votes
0answers
206 views

wp_update_post post_content not being updated accordingly

I have a function that is hooked into save_post, which updates / creates a product in Woo Commerce according to the creation / updating of a custom post type (video). The creation works fine and so ...
0
votes
0answers
62 views

Update Post with Modified Data

Task is to take class from <pre class="php"></pre>, and add that class to <code></code> and wrap all content of <pre> into <code> after that. I am querying WP with ...
0
votes
0answers
191 views

Wordpress custom field being lost on wp_update_post, with a twist

I'm using wp_update_post to programmatically add a title and tags to posts from the front end. I'm running into a hair-tearing issue with custom fields in the process: one of the two custom fields ...