Forum Replies Created
-
AuthorPosts
-
Tom
MemberHuzzah! That did it – Thanks, Barry! I didn’t understand the parameters in the parentheses were basically performing an OR for the query. Works like a champ, and cleaned up my code! Thanks again!
Tom
MemberCool, thanks Barry. I have amended my functions.php with the mixin function you referenced. Here is the new functions.php:
Now, however, my custom posts of type ‘Newsletter’ don’t display properly, so I had to return to the old functions file for now.
Please forgive my lack of education – I don’t understand all the syntax. How would I edit the function referenced here: http://pastebin.com/mmpxj5pJ to properly include Newsletters while at the same time not excluding events?
Tom
MemberIncidentally, I accidentally posted a duplicate of this issue here:
Did this get fixed with the update to 2.0.9, which has come out since you first posted?
No, unfortunately not.
Does changing to a different template under Events -> Settings have any bearing on the problem?
No, unfortunately not.As it turns out, I believe in my case I have a problem with my functions.php…
1) I am using the plugin Custom Post Type UI to allow the business to create Newsletters.
2) To get these to show up on the home page, I had to create a custom functions.php.
3) If I remove or comment out the functions in my custom functions.php, the Calendar shows correctly – hooray! but then, of course, my customer’s custom posts don’t display as posts on the news page.
Check out the content of my functions.php here:
http://pastebin.com/PiVEQZsrTom
MemberThanks for the suggestion – try here:
Tom
MemberCan’t seem to post the entire contents of the functions.php – how should I do so?
Tom
Member~ query_vars[‘suppress_filters’] )
~ /* $query->set( ‘post_type’, array( ‘post’, ‘tribe_events’, ~ ‘attachment’ ) );
~ /* return $query;
~ /* }
~ */
~ add_filter( ‘pre_get_posts’, ‘mlgma_my_get_posts’ );
~ function mlgma_my_get_posts( $query ) {
~ if ( is_home() && false == ~$query->query_vars[‘suppress_filters’] )
~ $query->set( ‘post_type’, array( ‘post’, ~’Newsletter’, ‘attachment’ ) );
~ return $query;
~ }
~ }
~ ?>Tom
Membersorry – didn’t include the entire contents:
‘query_vars[‘suppress_filters’] )
/* $query->set( ‘post_type’, array( ‘post’, ‘tribe_events’, ‘attachment’ ) );
/* return $query;
/* }
*/add_filter( ‘pre_get_posts’, ‘mlgma_my_get_posts’ );
function mlgma_my_get_posts( $query ) {
if ( is_home() && false == $query->query_vars[‘suppress_filters’] )
$query->set( ‘post_type’, array( ‘post’, ‘Newsletter’, ‘attachment’ ) );
return $query;
}
}
?>’Tom
MemberOK, I think I have it narrowed down to functions.php…
1) I am using the plugin Custom Post Type UI to allow the business to create Newsletters.
2) To get these to show up on the home page, I had to create a custom functions.php.
3) If I remove or comment out the functions in my custom functions.php, the Calendar shows correctly – hooray! but then, of course, my customer’s custom posts don’t display as posts on the news page.This is the content of my functions.php. I would love some help.
~ query_vars[‘suppress_filters’] )
~ /* $query->set( ‘post_type’, array( ‘post’, ‘tribe_events’, ‘attachment’ ) );
~ /* return $query;
~ /* }
~ */
~
~ add_filter( ‘pre_get_posts’, ‘mlgma_my_get_posts’ );
~ function mlgma_my_get_posts( $query ) {
~ if ( is_home() && false == $query->query_vars[‘suppress_filters’] )
~ $query->set( ‘post_type’, array( ‘post’, ‘Newsletter’, ‘attachment’ ) );
~ return $query;
~ }
~ }
~ ?>Tom
MemberThanks for the suggestion – still no good. I even double checked and re-saved my permalink settings.
Tom
MemberI have a similar problem…
Using Events Calendar Pro 2.08 in a child theme for Theme Hybrid 1.1 (http://themehybrid.com/themes/hybrid).
When I revert to an unmodified twentyeleven theme, events show up fine on both the calendar and individual posts.
when I use my child theme, there is no calendar (http://www.mlgma.com/events/), events don’t show up in any widgets, but they DO show up on individual event posts (http://www.mlgma.com/event/july-test/). Of course you will see there are other things not brought in by the style sheets.
Struggling a bit here, as this is my first foray into modifying a WordPress site like this.
Thanks for any and all feedback!
-
AuthorPosts
