This topic has 4 replies, 2 voices, and was last updated 12 years, 10 months ago by Fem.
Viewing 5 posts - 1 through 5 (of 5 total)
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
I’m online in Skype if you would like to communicate. BTW I have seen that you have only 1 category so if you exclude how will it show you the other categories its nothing there to exclude.
Regarding the comments i have added support in albums for the comments
Regards
Maqk
Thankyou for adding support for comments in albums, could you tell me how you did this as I would like to add comments to the Gigs pages too.
I only want to exclude posts from that one catgeory, do I need to setup a ‘generic’ category for all the other posts?
Thanks
I’ve managed to achieve the catgeory filtering a different way by adding another catgeory and using this code:
$args = array(
‘post_type’ => ‘artists’,
‘posts_per_page’=> $artist_limit,
‘paged’ => $paged,
‘artists_cat’ => ‘Established’
);
Still need help with adding comments for the gigs pages though please.
open musicplay/musicband/albums/ album.php file and in that find the below line
'supports' => array('title','thumbnail', 'page-attributes','editor',),
and in the last after ‘editor’, add like this ‘comments’ see the code below to see how it looks like after adding.
'supports' => array('title','thumbnail', 'page-attributes','editor','comments'),
similarly for other post types if you wish to add
and after that in the single-albums.php page you can add the comments code before inner and pagemid as shown below
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.