Search Only Works when Logged into Admin
Search Only Works when Logged into Admin
Search Only Works when Logged into Admin
to create a page with your own content, you can do like that : add_action(“admin_menu”, function () { $post_type = get_post_type_object(“property”); add_submenu_page( ” ” , “Page title” , “” , $post_type->cap->edit_posts , “property__validationForm” , function () { do_action(“property/validationForm”); } ); }); add_action(“property/validationForm”, function () { ?> <pre><?php var_dump($_GET);?></pre> form <?php }); to create a URL … Read more
Ok, first thing is to backup your entire site if possible. At least backup the database (which you should be able to do from the tools provided by your hosting company.) Next thing is to start deactivating plugins. Try one at a time… and see if the full admin/dashboard returns. As I guess you can’t … Read more
This is what i am using; add_action(‘init’, ‘blockusers_init’); function blockusers_init() { if (is_admin() && !current_user_can(‘administrator’) && !(defined(‘DOING_AJAX’) && DOING_AJAX)) { wp_redirect(home_url()); exit; } } It’s possible the best one. EDIT : You need a custom login page for reach wp-admin. This code redirect to homepage if you enter directly to wp-admin.
I think that would depend how you’ve made your site private? I’ve used this plugin to set sites to private https://wordpress.org/plugins/jonradio-private-site/ It also has settings to exclude any URLs from being set to private. There are a bunch of other plugins that do similar thins.
All functions place in functions.php of your theme. And create redirect on template_redirect hook. add_action(‘template_redirect’, ‘make_redirect’); function make_redirect() { if ( ! is_admin() && ! current_user_can( ‘administrator’ ) ) { wp_redirect( ‘https://google.com’ ); } }
How can I restrict ‘edit_form_after_’ to a specific post/page?
I know this question is kind of off-topic but I need to come in and say firstly don’t add anybody… anybody…. ANYBODY!! as admin on the site… At that level they can do everything you can do, or probably a lot more if they actually know what they’re doing :-p It’s a good way of … Read more
Create WordPress Menu Item Without Linking to a Custom Page
WP administration over SSL using different domain