WordPress.org

Ready to get started?Download WordPress

Forums

WP About Author
Author Box appearing on Custom Post Types (3 posts)

  1. iftomkins
    Member
    Posted 1 year ago #

    Hey,

    Love the plugin, but when I had the box "Display on individual posts" checked, the box displayed on a custom post type post. My client freaked out!

    Hahaha, anyways: Is there any way to insert the author box via a template tag, or block of code, or perhaps another way to exclude it from custom post types?

    Thanks!
    Alan

    http://wordpress.org/extend/plugins/wp-about-author/

  2. matt.peluso
    Member
    Posted 1 year ago #

    Have you ever figured out a fix for this?

  3. codex73
    Member
    Posted 1 year ago #

    This is what I did to solve the problem so it doesn't on some Custom Types:

    I wrapped this line:

    return apply_filters( 'wp_about_author_display', $return_content );

    Grab the ID of the post, check the post type against the array of post types I don't want to include the Author Box, then return the filters if passes check:

    $postid = get_the_ID();
    $my_custom_types = array("one-custom-type-name","products");
    if (!in_array(get_post_type($postid), $my_custom_types)){
        return apply_filters( 'wp_about_author_display', $return_content );
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.