WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
[Plugin: AddThis] Exclude from posts in a certain category (1 post)

  1. rwalktheplank
    Member
    Posted 2 years ago #

    Hello, I am looking for a simple function to run in my functions.php file that will allow me to set the default meta box to be in the checked state for posts in a certain category. This is as close as I have come.

    add_filter('post_metabox', 'my_post_metabox');
    function my_post_metabox($checked)
    {
    if (in_category('27')){
    $checked = "checked";
    }
    return $checked;
    }

    http://wordpress.org/extend/plugins/addthis/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags