From time to time you need to set up a bunch of conditions with Oxygen Builder that requires Page or Posts ID numbers. To get them you need to open every page or post and find it under URL. Much easier is to get numbers directly inside Admin Columns so you don’t need to open them at all.
<?php
add_filter('manage_posts_columns', 'dplugins_posts_columns_id', 5);
add_action('manage_posts_custom_column', 'dplugins_posts_custom_id_columns', 5, 2);
add_filter('manage_pages_columns', 'dplugins_posts_columns_id', 5); // for pages
add_action('manage_pages_custom_column', 'dplugins_posts_custom_id_columns', 5, 2); // for pages
function dplugins_posts_columns_id($defaults){
$defaults['wps_post_id'] = __('ID');
return $defaults;
}
function dplugins_posts_custom_id_columns($column_name, $id){
if($column_name === 'wps_post_id'){
echo $id;
}
}
?>
Trigger Location: Everywhere
Script Location: PHP