Tags break custom Excerpt function
Try removing the stripslashes() function.
Try removing the stripslashes() function.
If you use wp_list_categories (see Codex), it automatically adds the classes cat-item,cat-item-{ID} and (to the current category being viewed) current-cat. (It also adds current-cat-parent to the parent of the current category). This should be enough to style any particular category a certain way, and style the current category a particlar way. However, you can obtain … Read more
The problem is probably because wp_print_scripts is too late to deregister scripts as this is when they are outputted to the template. You should consider using wp_enqueue_scripts or wp_register_script instead. This question may help: wp_enqueue_scripts, wp_register_scripts, wp_print_scripts: i’m confused
The action is called without any variables: do_action(‘admin_notices’); So you don’t get $error_token and $error_tag.
The proper way to include styles and scripts is with the wp_enqueue_script() and wp_enqueue_style() functions. The codex pages on both of these functions covers how to use them very well. Basically you just need to give the script the source (do it relative to your current PHP file) of the script/style and a slug to … Read more
yeah, the question is a bit unclear. but i think you need shortcode attributes function get_custom_field_fn( $atts) { global $post; extract( shortcode_atts( array( ‘meta’ => ” ), $atts ) ); $custom_field_value = get_post_meta($post->ID, $meta, true); return $custom_field_value; } add_shortcode(‘cf_name’, ‘get_custom_field_fn’); see the codex: http://codex.wordpress.org/Shortcode_API#Attributes
add_action(‘admin_notices’, ‘my_custom_notice’); function my_custom_notice() { global $current_screen; if ( ‘my_post_type’ == $current_screen->post_type ) { echo “<h1>Whatever needs to be said</h1>”; } } Put this in your functions.php or plugin file. Replace ‘my_post_type’ with the name of your post type.
This looks like a custom function. It’s passing $count to a function called array_pick() to limit the size of your follower array. It also looks like array_pick() is a custom function. But you can easily stop the function from limiting your count by removing the call to array_pick(): function get_random_followers($userid, $count = 10){ $followers = … Read more
You can remove post type support for the editor on a conditional basis. The following should work: add_action( ‘add_meta_boxes’, ‘wpse45113_remove_editor’ ); function wpse45113_remove_editor() { // change the capability and post type to whatever is appropriate if ( ! current_user_can( ‘install_plugins’ ) ) remove_post_type_support( ‘post’, ‘editor’ ); } I’m using add_meta_boxes because it fires not too … Read more
When developing locally, always set the following in your wp-config.php to see all errors: // DEBUG error_reporting( E_ALL ); /** Php error log */ @ini_set( ‘log_errors’, ‘On’); @ini_set( ‘display_errors’, ‘On’); define( ‘WP_DEBUG’, true ); define( ‘SAVEQUERIES’, true ); // file: /core_root/content/debug.log define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, true );