
searchcloudone(@searchcloudone)
1 Post
Customers
Quote from searchcloudone on May 1, 2022, 15:58
I bought the Pro version of WPBE because I have a customer site with thousands of custom posts with many duplicate titles, so I want to append the published date to all the titles or just the duplicates.
I managed to append the ID to selected post titles by using {TITLE} - {ID} as a possible solution, but customer wants to append the Date Published instead, is there a variable for that?
I thought that Published might be a meta field but could not find it, I tried {TITLE} - {ID} - {meta:_edit_last} since _edit_last was the closest I could find in the posts, but that caused the Title field to be blank.
I also don't see the 'behaviour dropdown' in the Title field that is shown in one of your FAQ pages, I thought it might allow Append of the Date Published, but the drop down isn't there and I can't find a way to display it in the Help.
I bought the Pro version of WPBE because I have a customer site with thousands of custom posts with many duplicate titles, so I want to append the published date to all the titles or just the duplicates.
I managed to append the ID to selected post titles by using {TITLE} - {ID} as a possible solution, but customer wants to append the Date Published instead, is there a variable for that?
I thought that Published might be a meta field but could not find it, I tried {TITLE} - {ID} - {meta:_edit_last} since _edit_last was the closest I could find in the posts, but that caused the Title field to be blank.
I also don't see the 'behaviour dropdown' in the Title field that is shown in one of your FAQ pages, I thought it might allow Append of the Date Published, but the drop down isn't there and I can't find a way to display it in the Help.

Pablo Borysenco(@pavlo_borysenco)
20,287 Posts
Quote from Pablo Borysenco on May 2, 2022, 09:38
Hello
You can create a custom code
An example:
In file - wp-content\plugins\bulk-editor\classes\models\posts.php - chamge this line - https://share.stackovergo.com/image/i20220502073631.png
return apply_filters('wpbe_apply_string_replacer', $val, $post_id);
In functions.php add code:
add_filter('wpbe_apply_string_replacer', function($val, $id){
if (stripos($val, '{DATE}') !== false) {
$val = str_ireplace('{DATE}', get_the_time('Y-m-d', $id) , $val);
}
return $val;
});
Hello
You can create a custom code
An example:
In file - wp-content\plugins\bulk-editor\classes\models\posts.php - chamge this line - https://share.stackovergo.com/image/i20220502073631.png
return apply_filters('wpbe_apply_string_replacer', $val, $post_id);
In functions.php add code:
add_filter('wpbe_apply_string_replacer', function($val, $id){
if (stripos($val, '{DATE}') !== false) {
$val = str_ireplace('{DATE}', get_the_time('Y-m-d', $id) , $val);
}
return $val;
});