How to controll the Posts post type and general wondering about WP data structure

You can use the globals $menu, $submenu and $wp_post_types for renaming. Code: function wpse124233_alter_builtin_post_menu_label() { global $menu; global $submenu; $menu[5][0] = __( ‘YourName’ ); $submenu[‘edit.php’][5][0] = __( ‘YourName’ ); $submenu[‘edit.php’][10][0] = __( ‘Add YourName’ ); $submenu[‘edit.php’][16][0] = __( ‘YourName Tags’ ); } add_action( ‘admin_menu’, ‘wpse124233_alter_builtin_post_menu_label’ ); function wpse124233_alter_builtin_post_labels() { global $wp_post_types; $labels = &$wp_post_types[‘post’]->labels; $labels->name … Read more

how do I get the title in the post [closed]

If you just want to wrap the post title in a permalink, change this: echo ‘<h3 class=”entry-title media-title”>’ . get_the_title() . ‘</h3>’; …to this: echo ‘<a href=”‘ . get_permalink() . ‘”><h3 class=”entry-title media-title”>’ . get_the_title() . ‘</h3></a>’; Codex reference: get_permalink()

change the post time on multiple posts

If you have the id of the posts, you can use wp_update_post and change the post_date. foreach ($postId as $id) { // random hour and time. You can also manually set these. $h = rand(1, 23); $i = rand(0, 59); $newDate = array( ‘ID’ => $id, ‘post_date’ => “2013-12-19 $h:$i:59” // [ Y-m-d H:i:s ] … Read more

remove all custom post created

Manipulating posts directly in database is rarely good idea, since it skips all the APIs, hooks and so on that normally participate in the process. You should use get_posts() to retrieve the list and wp_delete_post() for deletion to ensure it is done properly and there are no leftovers.