how to add older post to new wordpress post with new post?

If you have your old database and uploads folder, you can install WordPress and give it that database. Then, you can use the wordpress importer/exporter to export the posts, then upload it to your new site using the same plugin. If your old site is much larger, it may even be easier to take an … Read more

Change target of view link in admin

The “View” link I believe you were referring to isn’t the only place the url should change so I took the liberty and changed them in the other spots as well. This affects only published posts and pages. It’s quite a bit of code but this should do it. // Change the “View” link on … Read more

Post categories to pages

Generally, pages cannot be added to categories or tags by default. Posts can can be categorized and tags. If you google search “WordPress categorize pages” at least a couple of plugins can probably help you figure it out. Otherwise, you can check out the code for some of those plugins to see how it’s done … Read more

It is possible to add extra button under the ‘publish’ button in the post of wordpress? and how?

Here is how you can add another button to the admin page. Download the MetaBox plugin Create a file called “button.php” in the wp-content folder Inlcude “button.php” in functions.php In button.php, type: add_filter( ‘rwmb_meta_boxes’, ‘admin_button_register_meta_boxes’ ); function your_prefix_register_meta_boxes( $meta_boxes ) { $prefix = ‘admin_button_’; $meta_boxes[] = array( ‘id’ => ‘standard’, ‘title’ => esc_html__( ‘Standard Fields’, … Read more

Updating post data on save (save_post vs wp_insert_post_data)

At first, Data was sanitized here (line 2997). If you don’t want any plugin/theme run on action save_post. User function remove_all_actions to remove all functions hooked to action save_post. function post_save_action($post_id, $post, $update) { if ($this->is_temp_saving_post($post, $post_id)) { return; } // Check user permissions if (!current_user_can(‘edit_post’, $post_id)) return; // Update post if (!$this->is_proper_post_type($post)) { return; … Read more