For some reasons I show the Last Modified information to my users in the blog. Recently I have to clear up my categories and tags, but these actions will result in the update of 'Last Modified' field of a post, which is not actually I desired. Content updates are what readers really concerned about, and not about meta information (like tags, categories, custom fields, descriptions, etc). So is there a way to update the 'Last Modified' field of a post …
I am trying to enable revisions for an existing custom post type. As the post type was already created about 2 years ago so where the post type was register I added revisions to the supports array. Earlier my code was like: $labels = array( 'name' => 'Products', 'singular_name' => 'Product', 'all_items' => 'All Products', 'add_new' => 'Add New', 'add_new_item' => 'Add New Product', 'edit_item' => 'Edit Products', 'new_item' => 'New Product', 'view_item' => 'View Product', 'search_items' => 'Search Products', …
Revisions show past versions of the article/page but is there a way of seeing the Visibility status historically? User A publishes User B edits the published page changing the visibility to something like private Is this reflected anywhere in the history/revisions?
I was wondering if there was some way to display / track down the recent changes for the pages (and possibly posts). I mean, showing "admin updated "x" page Jan. 15, 2022 3pm". Something like my old site. This is the current site. Maybe I'm asking too much but I also would like to reflect what was exactly updated as well. I must clarify that I don't want this to be only seen internally, I want it to be shown …
I'm trying to fetch preview data through WP Rest API using a url such as /wp-json/wp/v2/pages/1140/revisions/1653. An extra header is also included: 'X-WP-Nonce': <nonce> - nonce comes from WP. Why am I getting 401 unauth error? Thanks { code: 'rest_cannot_read', 2020-07-21T11:45:35.930292+00:00 app[web.1]: message: 'Sorry, you are not allowed to view revisions of this post.', 2020-07-21T11:45:35.930293+00:00 app[web.1]: data: { status: 401 } }
My WordPress has only 23 posts but the wp_posts data is over 70MiB. Is it the average size? The Posts I have were created with WPBakery Visual Composer and has 10 revisions. However, I deleted all the revisions with Revision Control but the wp_posts data size has no change. --- update info on Apr 22, 2016 @ 12:12pm -- I found the wp_posts data it has over "60000+" rows of data. -- update info on Apr 27th 2016 @ 5:02pm …
iaccidentally deleted some of my content then published it. Now my layout is all messed up . but cant find the revisions option on new update ( WordPress 4.9.5.)
In WP revision i can not see if i upload featured image and update post. WP revision save just content, heading and excerpt. I have problem with some employs, they said that uploaded image and we do not have that in Database. How can i see in revision or in database if someone upload image on post and update post?
I just restored a page to a version from august of this year but I can see on the live site it's still there. I refreshed the page and cleared the cache however it is still showing on the live site. How long will this take ?
I have the following query running to grab post revisions to show specific data on the front-end to users... $postType = 'items'; $metaKey = 'price'; $query = " SELECT c.meta_value,post_modified FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = %s AND c.meta_key = %s order by post_modified DESC "; $metaValues = $wpdb->prepare($query, [$postType, $metaKey]); $metaValues = $wpdb->get_results($metaValues); Once the data is gathered, it only seems to return …
I have a particular need to show post revisions of a particular custom field (I used ACF) in a custom post type on the front end for users so they can see how the data has changed over time. Is there a way to do this so they can see how the value had changed over time with each revision?
I have read numerous times that I should clean up my database to keep performance high. Keeping multiple revisions of posts is always cited as a big performance stealer. I'm suspicious of this claim. I get that the table will be significantly larger with 10 revisions than 2, but will it really be slower in operation? Given that there are indexes (or should be) on the fields you look things up on frequently, queries should still be nearly as quick. …
I'm working on an internal knowledgebase and I want to show the post history on the front end (with something like author, date and difference). I first landed on wp_get_post_revision() (https://developer.wordpress.org/reference/functions/wp_get_post_revision/) and after more searching I found wp_list_post_revisions() (https://developer.wordpress.org/reference/functions/wp_list_post_revisions/) which looks closer to what I want. However, while messing with this I'm running into errors while updating posts (Updating failed. The response is not a valid JSON response.) and I don't see anything on the front end when I return …
(I'm not sure if this is specific to Woocommerce or not, since the solution may be a general Wordpress process.. if it is I will delete and move to the wordpress forum) I added Woocommerce to an existing site with the Astra theme. My site already had a nice homepage. The shop was to be reached from a menu. Woocommerce installed fine, and I decided to configure its settings. It quickly prompted me to create a 'custom homepage', and I …
I need to show history of post changes (post revisions) at the end of post content. I saw tips about "Last modified by/date" feature but I need to show the table of all changes (revisions) done on post (Date/author/content- if possible). It's formally required for public institutions and I'm bit surprised there are nothing on Google. Is there a way to do that?
I trying to print older post revisions on the content.php site (theme: twentytwenty), and this, with staticly set value works.. $query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}posts WHERE post_type = 'revision' AND post_parent = '6'"); But if I wanted this dynamically for each post it prints me only ID of post and nothing more.. That magic piece of content.php: <?php $post_id = the_ID(); global $wpdb; //$result = $wpdb->get_results("SELECT * FROM wp_posts WHERE post_type = 'revision' AND post_parent = '. $post_id.';"); $query …
The date format looks like this "$ datef = _x ('F j, Y @ H: i: s', 'revision date format');" but I want it to be like this "$ datef = _x ('Y-m-d @ H: i: s', 'revision date format');". I don't want to modify the core of wordpress, is there a way to do it with a hook? This is in wp/wp-includes/post-template.php, the function is called "wp_post_revision_title_expanded".
I have the following doubt related to the posts table of the WordPress database. I see that when I create a new post in this table are automatically created 2 new rows. 32 1 2014-08-16 15:07:22 2014-08-16 15:07:22 TEST REVISION TEST REVISION inherit open open 31-revision-v1 2014-08-16 15:07:22 2014-08-16 15:07:22 31 http://localhost/wordpressAsper/2014/08/16/31-revi... 0 revision 0 31 1 2014-08-16 15:07:22 2014-08-16 15:07:22 TEST REVISION TEST REVISION publish open open test-revision 2014-08-16 15:07:22 2014-08-16 15:07:22 0 http://localhost/wordpressAsper/?p=31 0 post 0 I know …