WordPress Get Header and Footer using in Admin Area

A very simple experiment… add_action(‘admin_init’,’get_header’); add_action(‘admin_init’,’get_footer’); … will demonstrate that the get_header() and get_footer() functions work on the back end as well as the front, though you will need to adjust for numerous markup problems and other issues. Honestly, you question seems to be “how do I get the site header and footer and use … Read more

How to add conent (text) to Add New pages form of admin in WordPress

The hook to use here is admin_notices. However in register_activation_hook and register_deactivation_hook it shouldn’t be used because these function run when plugin activates and deactivates instance. A workaround it we use add_option when plugin activates and delete_option when plugin deactivates. Here is the code. Hopefully you will understand it properly <?php function my_admin_notice() { $screen … Read more

How to update my website with WordPress?

Of course you can. First you need to install a local server. Here are some choices: Wamp Xampp VVV USB Web Server Cloud9 After you create your website all you have to do is to transfer it to your new domain name. There are numerous backup plugins that can do the job. Here is an … Read more

get_current_screen – ‘Trying to get property of non-object’ error

I tested this code and it worked fine. Where are you requireing screen.php? Same way as this? require_once(ABSPATH . ‘wp-admin/includes/screen.php’); add_action( ‘parse_query’, ‘filtering_edit_table’ ); function filtering_edit_table( $query ) { $screen = get_current_screen(); if( is_admin() && $screen->post_type == ‘custom_post_type’ && $screen->base == ‘edit’ ) { print_r($screen); } }

admin_url() do not retrieve the correct url in an subdirectory install

I solved my problem by trying this (and it works!): function get_some_url() { $full_url = add_query_arg( ‘action’, ‘action-name’, admin_url( ‘users.php’ ) ); //$relative_url = str_replace( get_site_url(), ”, $full_url ); //return $relative_url; return $full_url; } This was tested in a localhost/subdirectory install and in a live install (not subdirectory). Now the URL is retrieved correctly.

WordPress User profile page fields missing

This is the new default password methodology used in WordPress 4.3. In WordPress 4.3, if you have Javascript disabled or broken, then you will get the normal New Password and Repeat New Password fields. If you have Javascript enabled and running normally, then you only get the Generate Password button. If you get two things … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)