Forum Replies Created
-
AuthorPosts
-
November 16, 2011 at 11:08 am in reply to: "has_archive" on the custom post type tribe_events #11180
Jonah
ParticipantHi Julien,
I’ve got the SEO plugin installed and added the breadcrumb code to the page.php template but am still not clear on what exactly you’re trying to achieve. What archive page are you talking about, the date archives within WordPress? Do you have an example you can provide so we can talk a look or provide some more detail please.
Thanks,
JonahNovember 16, 2011 at 7:21 am in reply to: Homepage customization / including upcoming and past events #11158Jonah
ParticipantHey Adam,
Where’s your query for past events like you had before? You don’t have it in the code and that’s why you’re not seeing past events anymore. You’re only querying your upcoming events. The example I gave was just for your upcoming events but you’ll want to do the same thing for listing your past events.
Upcoming:
$upcoming = tribe_get_events( array('eventDisplay'=>'upcoming', 'posts_per_page'=>-1, 'tax_query'=>array(array('taxonomy'=>'tribe_events_cat','field'=>'id','terms'=>3))));
Past:
$past = tribe_get_events( array('eventDisplay'=>'past', 'posts_per_page'=>-1, 'tax_query'=>array(array('taxonomy'=>'tribe_events_cat','field'=>'id','terms'=>4))));
Make sense?
Regards,
JonahNovember 15, 2011 at 9:02 pm in reply to: Linking Caspio directory to the "Venue" pages (passing parameters?) #11152Jonah
ParticipantHi Sandy,
I don’t really understand what you’re trying to do. Do you want the Venue information from ECP displayed on one of your Caspio pages? Can you please provide some more details to help me understand.
Thanks,
JonahJonah
ParticipantHi Anthony,
I’m going to need to see your entire table.php file. Can you please post this?
Thanks,
JonahJonah
ParticipantNote: fix the single quote in the code above 🙂
Jonah
ParticipantHi Cary,
Also try using:
if(is_single() && ‘tribe_events’ == get_post_type()) {
//code to run
}
Regards,
JonahJonah
ParticipantHi Cary,
Try using:
if(is_single() && ‘tribe_events’ == get_post_type()) {
//code to run
}
Regards,
JonahJonah
ParticipantHi Cary,
Try:
if(is_single() && ‘tribe_events’ == get_post_type()) {
//your code here
}
Regards,
JonahNovember 14, 2011 at 9:06 pm in reply to: Homepage customization / including upcoming and past events #11092Jonah
ParticipantHey Adam,
You’re welcome!
Since ECP and TEC use taxonomies for categories you’ll need to include taxonomy arguments in your query like so:
$upcoming = tribe_get_events( array('eventDisplay'=>'upcoming', 'posts_per_page'=>-1, 'tax_query'=>array(array('taxonomy'=>'tribe_events_cat','field'=>'id','terms'=>3))));
Where ‘terms’ is the ID of your category (really your taxonomy). You can also change ‘field’ to slug and use the slug of the category instead.
More details on querying by taxonomies is here: http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
That should do it for you but let me know if you need any other help with this.
Regards,
JonahJonah
ParticipantHi Nick,
Try using http://plugins.elliotcondon.com/advanced-custom-fields/ like I mentioned in the other thread you had a question in. You’ll be able to conditionally turn on any custom fields you create on ECP pages.
Regards,
JonahJonah
ParticipantHi Nick,
As Rob pointed out it’s not something built into ECP but you can definitely use custom fields to do it and I would recommend http://plugins.elliotcondon.com/advanced-custom-fields/ – the beauty of this plugin is that it allows you to conditionally create custom field boxes so you can create custom fields that only display on ECP pages.
You could hack the core somehow to achieve this through ECP but your changes would likely be lost upon upgrade or else you would have to keep careful track of those changes.
I hope that helps.
Regards,
– JonahNovember 14, 2011 at 12:28 pm in reply to: Homepage customization / including upcoming and past events #11061Jonah
ParticipantHi Adam,
It looks like the code you were using from Pastebin above had bad single quotes that was not properly passing the upcoming and past arguments to the query. If you fix the single quotes, it works. See here: http://pastebin.com/GhbcrssP
Let me know if you need anything else.
Regards,
JonahJonah
ParticipantSounds good Cary, glad you got it worked out!
– Jonah
Jonah
ParticipantHi Will,
On the featured image – first make sure you are overriding the ECP templates by creating an ‘events’ folder in your theme directory and then place a duplicate copy of views/single.php in there. That way when you update your changes will remain!
Then, around line 90 take the code:
if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) {
the_post_thumbnail();
}
and place it below the_content() or wherever else you want it to appear… That should work but let me know if run into any issues.
On getting the next/prev month links at the bottom first make a duplicate copy of gridview.php in that same ‘events’ folder and then find the code around line 33 that looks like this: http://pastebin.com/ZHaZ1Pkf
And move that chunk of code wherever you want into the footer. You might have to do a little CSS’ing to get it looking right though…
I hope that helps,
JonahJonah
ParticipantHi Cary,
is_post_type() was a conditional only briefly available in 3.0 development and shouldn’t work anymore – try:
if ( ‘tribe_events’ == get_post_type() ) … instead.
Hmmm, for some reason it looks like that does not return true when when you refresh the page though… I’m going to bring this up with the devs but I think use can use:
if ( tribe_is_month()) { … and that will return true.
Let me know if you need anything else.
Thanks,
Jonah -
AuthorPosts
