Fatal error: Out of memory with the Duplicator plugin

I had the same problem. And I though that this might be due to the size of my MySQL file(5GB). So I selected the advanced option for the database upload which is to upload the database manually. I didn’t succeed doing so through the phpMyAdmin interface, instead I imported it through mysql cli with : … Read more

Get shortcode attribute for AJAX call

The problem is ordering. $srcDir is being set correctly, but when it’s set the call to wp_localize_script has already happened. Instead, consider changing your code to refer to a data attribute in the content that the shortcode returns. This also prevents the code being tied to only allowing a single instance per page. Additionally, there … Read more

Show custom taxonomy in theme

If you want to list out the custom taxonomy you have to use get_terms function For your requirement instead of creating new taxonomy you can modify the default category it self function custom_change_cat_object() { global $wp_taxonomies; $labels = &$wp_taxonomies[‘category’]->labels; $labels->name=”Author”; $labels->singular_name=”Author”; $labels->add_new = ‘Add Author’; $labels->add_new_item = ‘Add Author’; $labels->edit_item = ‘Edit Author’; $labels->new_item = … Read more

How do I restrict a second admin certain access?

I think this code will prevent certain users from getting into any part of the admin area (not tested): add_filter(‘admin_menu’, ‘block_users’); function block_users() { $current_user = wp_get_current_user(); // get current user object $allowed_user=”[email protected]”; // change to allowed user email if (! $current_user->user_login == $allowed_user) { wp_redirect(admin_url()); // redirect to dashboard exit; // to exit this … Read more