New answers tagged

-4

All those answers above are unnecessarily complicated. I am a newbie and I found this out by experimentation. $admin_title holds the title in admin-header.php, so simply remove — Wordpress from line 43-47 to remove "— WordPress" from the title. Play around in those lines to manipulate the title.


0

Adding to what Mark Kaplun said, you could probably have a look at User Meta Sessions Tokens. They can tell you, if there is an active session for a specific user. But that does not mean, that the user is active on the site and doing something, just that he logged in successfully. Anyway, don´t trust anyone that tells you to use is_user_logged_in()! That´s ...


0

On init set a transient for, say, 5 min that keeps updating as long as the current user (in this case, any admin) is poking around. Dump a list of those active transients from a shortcode into a page. That should do it.


2

Wordpress do not have a true concept of "logged in". Although the labels all around use the term, in the code the closest you get is something that might be called "authenticated users". The difference is that the authenticated user might be one that has his browser closed and therefor he is not "logged in". To do what you want you will first need to define ...


0

Norcross's example above is right on, but I needed the possibility of internationalization. If I had the reputation, this would be a comment under Norcross's answer, but since I don't, i'll just put the modified code here. 'i18n_context' is an arbitrary namespace for the translation context, this could be the name of your plugin or theme for example. ...


1

You can actually use the function you're using, you just need to use load-index.php (no need for globals if you don't need them): add_action('load-index.php', function(){ if(get_current_screen()->base == 'dashboard' && !wp_is_mobile()) wp_redirect(admin_url('edit.php')); });


0

Just to chime in, we use a plugin called ProfilePress (http://wordpress.org/plugins/ppress/) and couldn't be happier with it. It's actually a shortcode based WordPress form builder for creating custom login, registration and password reset forms at the front-end of your site.


0

Switch to full SSL for everything. Seriously, it's way easier than dealing with mixed content.


0

The plugin you are using is quite old. I use this one without issues: https://wordpress.org/plugins/wp-force-ssl/


0

You can solve issue by this way(If issue with plugin/theme related): Deactivating your plugins by ftp or the file manager by changing the name of the plugins folder to plugins-old. If that works activate them one by one until you find the problem. Switch theme to any default (just for a moment) by using ftp or the file manager on your hosted account to ...


1

In general, it is a bad idea to upgrade from such an old version to new version in one go. In your case, a huge amount of changes was done between the release of v3.8.1 and v4.4.1 which invloved changes in the db. I'm not sure which is the best option here to repair the db as it seems that you cannot log into the site. What I would suggest is, revert back ...


0

I have found my problem.. The website was using a plugin for adding the new post types and they were set to Hierarchical. Once i changed that everything started to work


1

The other answer is not working for my site. I tried this script instead and it works fine for removing the WordPress version number from the right footer of admin pages: add_filter( 'admin_footer_text', '__return_empty_string', 11 ); add_filter( 'update_footer', '__return_empty_string', 11 );


0

It's possible to change the output of the label with jQuery but I'm not sure the best hook to do this besides admin_footer. // Collapse var $open = jQuery('.acf-expand-details > .is-open'), $open_icon = $open.find('span'); $open.html('MIN Details -->'); $open.prepend($open_icon); // Expand var $close = jQuery('.acf-expand-details > ...


0

For anyone else in this dilemma, I took a different approach I set the origin as cdn.mydomain.com on AWS Cloudfront and added cname www.mydomain.com all working now :)


0

If you want to modify the page content, you need to ask the the password to your friend and login via localhost/wp/wp-admin. You can also create generate your own password and replace it in the database. If you want to modify the website structure, you have to open {your_webstite_folder}/wp-content/themes/{theme_name} and you'll find here every files you ...


0

As long as you know the username you can have WP automatically log you in. You might need to ask your friend what that is. Check to see if you're logged in and if not, get user by login, set the current user along with the auth cookie then redirect to the ~~user's admin~~ url or edit user url to change the password. Place this in the functions.php of the ...


0

When you say downloaded, do you mean exported (using the all in one migration plugin or similar). If so then yes, you need the username and password. I'm not sure if you're talking about ssh.


1

You can add a link to the widgets.php like that: add_action( 'admin_menu', 'f711_add_widgets_shortcut', 999 ); function f711_add_widgets_shortcut() { add_menu_page( 'Widgets', 'Widgets', 'publish_pages', 'widgets.php', '', '', 61 ); } Be sure to check your permission settings, and you may also include another image. You can find the documentation ...


0

I think you want to force everything to go over https, is that right? If so I'd remove your rewrite rule, make sure that that allows you to access admin (over http) and then use the WordPress HTTPS (SSL) plugin instead. It allows you to configure how SSL is used by WordPress, and I think you will find it easier to manage.


0

I am not sure, this is exactly you want BUT still here is an suggestion. If you want author to be redirect to specific place Then follow these two steps -: Step1 -: First build a custom page in wordpress with all available options which you have mentioned in your question. After building a custom page(step 1), you need to redirect Author/editor to that ...


0

Basic implementation: Create a page for the frontend (and optionally a template). Then add the following code to your functions.php: function login_redirect_capability() { if ( current_user_can('author') || current_user_can('editor') ){ return 'url-of your custom page'; } } add_filter('login_redirect', ...


2

You can use admin.php?action=my_action and WordPress will fire the equivalent action hook: // How to get the URL $url = admin_url( "admin.php?action=wpse_21460_export&any_other_arguments" ); // How to handle the URL function wpse_21460_export() { // Do your export and exit } add_action( 'admin_action_wpse_21460_export', 'wpse_21460_export' ); See ...


1

I believe you will need to add it via add_menu_page - but in the callback function you register that displays the page, you could re-direct away from it (or just display your own message), as needed. You could also remove it from showing up on the admin menu by calling remove_menu_page right after you add it. That ought to leave the page registered (with ...


0

As for Wordpress 4.4 I have to use following code to make it work: function adjust_admin_menu() { global $menu; remove_submenu_page( 'themes.php', 'nav-menus.php' ); // Add nav menu as top element $menu[31] = array( __( 'Menus', 'theme-slug' ), 'edit_theme_options', 'nav-menus.php', __( 'Menus', 'theme-slug' ), 'menu-top menu-nav', 'menu-nav', ...


1

It's what I thought - you're trying to send the file from the display callback, by which time it's too late. Look for the add_*_page() call that registers the menu item in the admin sidebar - the return value of this function call is the name of the hook you can use to attach the download function: $hook = add_submenu_page( $parent, $title, $menu_title, ...


4

As you've already discovered, links to the customizer always start with /wp-admin/customize.php. Append ?autofocus[section] =section_name to checkout your section within the customizer. Both parameters (section and section_name) are registered within your customize_register hook: $wp_customize->add_section If you can't find the hook, check the HTML ...


1

If you want this for all future users then hook into the user_register event and update it there. Pull the WP_User using get_userdata and wp_update_user info with the new display name. add_action( 'user_register', 'wpse_20160110_user_register', 10, 1 ); function wpse_20160110_user_register ( $user_id ) { // get the user data $user_info = ...



Top 50 recent answers are included