Tag Info

New answers tagged

0

// Disable support for comments and trackbacks in post types function df_disable_comments_post_types_support() { $post_types = get_post_types(); foreach ($post_types as $post_type) { if(post_type_supports($post_type, 'comments')) { remove_post_type_support($post_type, 'comments'); remove_post_type_support($post_type, ...


1

One of possible reason is you/automated installation might have turned off installation of new themes and plugins in wp-config.php. Make sure you do not have DISALLOW_FILE_MODS true in your wp-config.php file. define( 'DISALLOW_FILE_MODS', true ); If it is then remove this line. Enabling this option in config file will disallow updates and installations ...


0

It really depends on what text you want to replace it with. For example: if you want to replace it with the blog title, then believe it or not, it is VERY simple and can be done through CSS alone. The blog title already appears in the image, but it's been shifted offscreen by text-indent and all is required is to return it to normal. .login h1 a { ...


4

The filter views_{$this->screen->id} is fired just after the title of post edit screen has been print to screen, so it's a safe place to just echo what you want. So you can simply do: function post_type_desc( $views ){ $screen = get_current_screen(); $post_type = get_post_type_object($screen->post_type); if ...


1

It's not the most elegant solution but it works. Thanks to G.M. for pointing me in the right direction. This filter passes us an array of views. The format is something like this: array( 'list-item-class' => 'list-item-content' ); So What I ended up doing was adding my description as the first index in the array so that it was easy to manipulate: ...


1

In WP terminology these are called Views. They are pretty generic, implemented on WP_List_Table level and passed through dynamic views_{$this->screen->id} filter. Killing them completely for your requirements is as simple as: add_filter( 'views_users', '__return_empty_array' ); Of course you might want to do something more thorough, like modifying ...


0

Rather than rendering the metabox only to hide it with jQuery you can use this. The only difference being that the hiding/showing of the metabox requires selecting 'Update' after changing the drop-down field. function add_meta_box() { global $post; if(!empty($post)) { $pageTemplate = get_post_meta($post->ID, '_wp_page_template', true); ...


-1

Here is a video how to set up that easy. Good luck ! https://www.youtube.com/watch?v=ukAlmqnTbNI


2

thanks @birgire with your help i change the code to make this work. everyone that looking for the same solution you can use this code: add_action( 'load-index.php', 'show_welcome_panel' ); function show_welcome_panel() { $user_id = get_current_user_id(); if ( 1 != get_user_meta( $user_id, 'show_welcome_panel', true ) ) update_user_meta( ...


0

Just figured it out... It was the positioning of the define statement. I added the below above the /* That's all, stop editing! Happy blogging. */ line define('FORCE_SSL_ADMIN', true); define('FORCE_SSL_LOGIN', true); Thanks!


2

Of course you can specify only the items you want to remove. Have a look in the code below: /wordpress/wp-content/plugins/your_plugin/your_plugin.php : add_action('admin_init', 'nwcm_admin_init'); function nwcm_admin_init() { // Remove unnecessary menus $menus_to_remove = array( // menu items you want to remove 'menu_item_1', ...


1

That's why the last line of the get_admin_url contains the line: return apply_filters( 'admin_url', $url, $path, $blog_id ); Any valid modification of the admin URL will be via that filter, so get_admin_url is the correct function to use in all cases.


0

It's possible by using jQuery to add the item to the drop down or adding another field and then use Ajax to intercept the click and perform your bulk action that way.


2

WordPress doesn't have built-in features for a site that is served in multiple languages. Yes WordPress has features for translating the UI labels into different languages, but not for the actual content. You are going to need to use a plugin that basically keeps multiple versions of each Post for each language and has means for the user to select the ...


0

I don't have enough reputation to reply to comment on your answer, so I will post it here: I had similar problem, and answer why class selector works (and id don't) is because on widgets page, that element appears twice (on left side to select it and drag to the right), and on the right side, in appropriate sidebar area. So, that element and everything in it ...


1

Please refer below : function disable_new_posts() { // Hide sidebar link global $submenu; unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]); // Hide link on listing page if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') { echo '<style type="text/css"> #favorite-actions, .add-new-h2, .tablenav { ...


0

The GravityForms plugin renames the top level menu item to match the first of the sub-menu. For example; if you've added just the gravityforms_view_entries capability to the Editor role, then the first sub-menu item will be "Entries", so the parent menu will be "gf_entries" not "gf_edit_forms". So, the following code will remove the "Help" item from the ...



Top 50 recent answers are included