Excerpt showing under title in admin columns

Atlast i found the solution, it was very silly mistake. It got nothing to do with plugin or theme or any code. It was one of the WordPress settings which i didn’t realize. Following pic shows the option to switch between excerpt view and list view of posts in wordpress. I by mistake selected excerpt … Read more

Disable login on multisite web sites

You can have a single login point which you can redirect to from all sites in the network, and then redirect back to the subsite after a successful login. We did something similar for the WordCamp.org network: http://meta.svn.wordpress.org/sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-global-login.php This will probably only work for subdomains, since you can’t really set a cookie for a different … Read more

How to change the descriptive text on the menus admin page?

The text you are referring to is located in here: wp-admin/nav-menus.php. But we will not edit directly. We will use functions.php for the convenience of preserving the changes after an upgrade. Use the following code in functions.php add_filter( ‘gettext’, ‘wps_translate_words_array’ ); add_filter( ‘ngettext’, ‘wps_translate_words_array’ ); function wps_translate_words_array( $translated ) { $words = array( // ‘word … Read more

How to pass a specific post id from “all posts” list in Admin panel

Assuming you’ve added the column correctly and not hacked it in somehow, then the manage_${post_type}_posts_custom_column filter should do what you want. The example in the Codex is about the best I’ve got given the sparcity of information in the question: add_action( ‘manage_posts_custom_column’ , ‘custom_columns’, 10, 2 ); function custom_columns( $column, $post_id ) { switch ( … Read more

Load stylesheet on custom admin submenu page

Ok, I figured it out: If it’s a submenu page, the $hook looks like this: appearance_page_page-name instead of going by URL. So the complete code would be this: function my_function($hook) { if ( ‘appearance_page_page-name’ != $hook ) { return; } wp_enqueue_style( ‘custom-style’, get_template_directory_uri() . ‘custom-page/style.css’ ); } add_action( ‘admin_enqueue_scripts’, ‘my_function’ );

Is there a filter to remove or replace the post title’s link in the admin post table view (edit.php)?

I would try something like below. Since current_user_can is called right before displaying the link, we have to hook where capabilities are checked. function wpse200630_has_cap_check( $allcaps, $caps, $args, $user ){ if( function_exists( ‘get_current_screen’ ) ){ $screen = get_current_screen(); if( $screen->base == ‘edit’ && $screen->post_type == ‘my_post_type’){ if ( ‘edit_post’ == $args[0] || ‘delete_post’ == $args[0] … Read more

How much traffic is real traffic?

First of all not all websites get the same amount of traffic as others. One of my websites gets like 100 views per day well the other one may get 10. As per making sure that the stats don’t include bots. I have never personally had a problem with bots affecting my page views. If … Read more

Admin mode breaks with subdomains in latest WP

The issue could be with setting up cookie which may happen if you have different siteurl and homeurl. To give it a try, please edit your wp-config.php file and add these two: define( ‘WP_HOME’, ‘abc.example.com/’); define( ‘WP_SITEURL’, ‘abc.example.com/’); Please replace abc.example.com with your actual subdomain. The thing to make sure is both URLs should match. … Read more

Include script files for admin submenu page

You must have created submenu page using add_submenu_page() hook, so you can use wp_enqueue_script inside callback function of add_submenu_page hook. It will load script only on your submenu page. add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug,’callback’); function callback() { //enqueue script } Or if you want to enqueue script in dashboard(all pages) then you can enqueue … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)