Tag Info

New answers tagged

0

I had the same issue. To fix it I had to make some changes to the database. Use phpMyAdmin or just log directly into the database and look at your wp_options table. Check the following two fields: siteurl and home. Make sure these fields hold the correct domain information if not change them and see what happens. In my case the issue was resolved.


0

You might wanna check : https://wordpress.org/plugins/tabsy/ . It's a responsive tab and shortcode ready so you don't have to add the code manually. I hope this helps. Thanks! Cheers, phpbits


0

The changes were being made in a stylesheet that is auto-generated by the parent theme. In the specific case of the Cherry parent theme (which is widely used in templates sold on themeforest, templatemonster etc), you cannot make stylesheet changes in reserved files such as main-styles.css (Despite them existing in a child theme). The solution is to either ...


0

After searching a lot i finally came up with this solution. My custom post type is "facility" and the custom_user_meta="organization_name". First go to http://localhost/wp-admin/options-permalink.php and choose custom structure - in the text box put /%organization_name%/%postname%/ After that put the below given code in functions.php add_action('init', ...


0

I think you should add an entry in database when admin log in and can remove or update that entry when user logout. there might be a situation when admin leave website without logged out for that you can set time for auto logout. I don't think there is a way to find out if admin is login or not from somewhere in wordpress. you just check if login user is ...


0

Thanks @circuus. This code worked out. To display an ACF-image feild - "profile_photo" as gravatar image you have to use the code mentioned below. add_action( 'show_user_profile', 'profile_tab' ); add_action( 'edit_user_profile', 'profile_tab' ); define('MY_ACF_USER_IMAGE_FIELD_NAME', 'profile_photo'); add_filter('get_avatar', 'my_get_avatar', 10, 5); ...


0

So i made this code from this help and work but i want to be this in ajax can somone help me my code now is: <div class="form"> <form name="newsletterform" method="post" action=""> <table> <tr> <td><label name="plus">VOTE +:</label></td> <td><input type="text" name="plus" maxlength="45" maxsize="30" ...


0

You can modify the arguments that the search query uses so it will return empty terms. This is a quick hack job, perhaps someone can improve this. I put it together by looking at the browser console when performing a search. There you can see the parameters it's sending to admin-ajax.php to perform the search. In the case of searching for a term in the ...


0

In WordPress 4.1.1 at least, In the Menu editor, Categories > View All Tab shows empty categories.


1

You can store the ratings as user meta. When a rating is added, add it to the user's ratings using add_user_meta(): add_user_meta( $user_id, '_ratings', $rating, false ); The last parameter tells it to add the current rating to the meta as a new item, not to replace the existing. All ratings can then be retrieved using get_user_meta(): get_user_meta( ...


0

To remove all the wordpress default items use the code given below. function remove_dashboard_meta() { remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); remove_meta_box( ...


0

To remove the comments menu from the top admin bar you can use the $wp_admin_bar global and the remove_menu() method like this: function my_admin_bar_render() { global $wp_admin_bar; $wp_admin_bar->remove_menu('comments'); } add_action( 'wp_before_admin_bar_render', 'my_admin_bar_render' ); As for changing the icon on the settings section of ...


1

You can remove the Screen Options with the 'screen_options_show_screen' filter. function myplugin_disable_screen_options( $show_screen ) { // Logic to allow admins to still access the menu if ( current_user_can( 'manage_options' ) ) { return $show_screen; } return false; } add_filter( 'screen_options_show_screen', ...


0

Here is a easier and cleaner way...call the node needed and use the part needed and replace what you want to update function np_replace_howdy($wp_admin_bar){ //New text to replace Howdy $new_text = 'Welcome'; $my_url = 'http://www.google.com'; //Call up the 'my-account' menu node for current values. $my_account = ...


0

Add this to your functions.php file, and note that you'll need to grab and edit the capabilities for each post type (Post, Page and Attachment) and taxonomy (Category and Post Tag). You should note that there are more capabilities than those listed, but I don't believe that the need changing. Therefore I advise you to output the default capabilites for ...


1

I am developing front-end content management screen and want to point all edit links to point to the front of the website. If you want to point all edit links to the FE, you should go for the get_edit_post_link filter solution (see Marko's answer). That will cover all cases where either the core or a plugin calls get_edit_post_link(). But if you want ...


6

Use get_edit_post_link filter. add_filter('get_edit_post_link', 'get_edit_post_link_178416', 99, 3); function get_edit_post_link_178416($link, $post_id, $context) { $scr = get_current_screen(); if ($scr->id == 'edit-post' && $context == 'display') { return 'http://google.com'; } else { return $link; } } You can ...


0

The problem you are seeing is that you have your declarations of the same importance from a CSS standpoint. If you add another style to give it more preference: #cqrm-current-item-list tr.cue-deletion.cue-coming-soon, #cqrm-current-item-list tr.cue-deletion.tr.cue-coming-soon *{ background-color: #fbb !important; filter: alpha(opacity=100) !important; } ...


0

Try to replace the add_options_page line with the following: add_menu_page( 'Global Custom Options', 'Global Custom Options', 'manage_options', 'functions','global_custom_options' );


1

You can use the views_{$this->screen->id} filter in WP_List_Table::views(), where screen ID in this case is edit-post: function wpse_177655_views( $views ) { $custom = sprintf( '<a href="%s"', esc_url( 'edit.php?post_type=post&custom=foobar' ) ); if ( ! empty( $_GET['custom'] ) && $_GET['custom'] == 'foobar' ) $custom .= ...


0

wp_enqueue_script() also registers the script. So, you'll also need to de-register it first. This code should work depending on how and where the script is enqueued. function my_dequeue() { wp_deregister_script( 'ocmx-jquery' ); wp_dequeue_script( 'ocmx-jquery' ); } add_action( 'admin_enqueue_scripts', 'my_dequeue', 10 ); You might also need to ...


1

EDIT From comments, it seems I've missed the actual purpose here Here is an update: There is no way to tell that or to know that. Every theme is unique and how a specific user uses a post format is also unique. If you read my answer, status is used to display statusses like twitter. So in content-status.php you would have just maybe the_excerpt(). ...


0

Post formats is an optional value added to WordPress posts which allows theme developers to define visual representation of a post. Theme developers can create themes with support for post formats. A number of post formats are available, however it is not possible for themes or plugins to introduce custom post formats. It is not necessary for theme ...


0

You can try this (sorry, not previously tested). See comments inline for explanation: RewriteEngine On ## if any string separated by | is matched, it will append to ?page= RewriteRule ^(members|add-members|delete)$ admin.php?page=%1 [L,E=CLEAN_CONTACT_URL:1,QSA] ## If querystring starts with page= and is followed by any string separated by | ## put that ...


0

The problem seems to be in the version of WordPress - specifically WordPress 4.1 while running MultiSite - I downgraded to 4.0.1 and all of the problems went away.


0

Yes, you can easily do it at the time of creating custom post type by using the register_post_type( $post_type, $args ) function. Don't use the 'editor' in supports parameter. register_post_type('posttype name',$args); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, ...


3

There is a built in WordPress function for this, remove_post_type_support http://codex.wordpress.org/Function_Reference/remove_post_type_support . In your case you could use something like add_action( 'init', 'my_custom_init' ); function my_custom_init() { remove_post_type_support( 'custom_post_type_name', 'editor' ); }


0

You can for example add this: foreach( array( 'tools', 'import', 'export' ) as $x ) { add_action( "load-{$x}.php", function() { if( ! current_user_can( 'manage_options' ) ) wp_die( __( 'No access!' ) ); } ); } to restrict access to the {tools,import,export}.php pages for non-admins.


1

You should use WordPress's default javascript file in admin. Check out ThickBox in Codex. Or, you can use jQuery UI Dialog plugin. You can find procedure to use in this answer of StackOverflow.


0

You can do it by adding your own management screens while removing he original ones from the menu. You will most likely still want to let the admin see the original screens unless you really want to replace the whole admin with exact equivalent which as all the good people in the comments had said is lots and lots of work.



Top 50 recent answers are included