Your Time:
Our Time:

Excluding categories and allowing comments

  • Resolved
    Posted in: MusicPlay  
    • Topics: 3
    • Replies: 5
    • Total posts: 8
    TheBandWagon
    Member
    November 8, 2013 at 1:52 am #575

    Hi,

    I have added a taxonomy to the Artists custom post type, I would like to exclude posts from a certain category from displaying on the Artists page. I’ve tried adding this to the array but it still shows all posts without excluding any from the category id 3 (its the up and coming artists I want excluded):

    $args = array(
    ‘post_type’ => ‘artists’,
    ‘posts_per_page’=> $artist_limit,
    ‘paged’ => $paged,
    ‘post__not_in’ => array(3)

    );

    Also I would like to allow comments to be posted on custom type posts, such as on the album review pages, I’ve tried adding the follwing code to the single-albums.php file but it doesnt work:

    <?php
    $comments = get_option(‘atp_commentstemplate’);
    if ( $comments == ‘posts’ || $comments == ‘both’ ) {
    comments_template( ”, true );
    }?>

    You can see the site in development here: http://dev.agtdesigns.co.uk/

    Any help really appreciated.

    regards

    Andy

    • This topic was modified 3 years by  TheBandWagon.
    • This topic was modified 3 years by  Fem.

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.