Forum Replies Created
-
AuthorPosts
-
Ken
ParticipantI think that works. I just had to make sure that I had it right after tribe_is_month()
I still don’t get this to render:
} else if(tribe_is_event() && !tribe_is_day() && is_single()) {
echo 'Single Event';
or
} else {
the_title();
Under what circumstance will it do these last two?
Ken
ParticipantI’m getting closer 🙂
Is there a way to check whether I am viewing the entire upcoming event list or a specific category upcoming event list?
I tried adding tribe_is_upcoming() but did not succeed.
if(tribe_is_month()) {
echo 'Calendar Grid';
} else if(!tribe_is_upcoming('category1')||!tribe_is_upcoming('category2')) {
echo 'All upcoming Event List';
} else if(tribe_is_event() && !tribe_is_day() && !is_single()) {
echo 'Event List';
} else if(tribe_is_event() && !tribe_is_day() && !is_single()) {
echo 'Event List';
} else if(tribe_is_event() && !tribe_is_day() && is_single()) {
echo 'Single Event';
} else if(tribe_is_day()) {
echo 'Single Day';
} else {
the_title();
}
Ken
ParticipantI have found a way to show the category title only on the upcoming events list:
echo single_cat_title();
Ken
ParticipantHi again. I found that
wp_title("",true);will remove the separator and is displaying the text for single day just as I would like it. However the same code for the category list renders as “Upcoming Events My Category”. Is there a way to remove the text “Upcoming Events” and just list the category? Also still wondering about the ‘single event’.@julien – thanks for the plug-in tip. I might check it out later. Basically are you telling me to register the post type that it has a archive page?
Ken
Participantok I was able to replicate the issue, and it was the code I am using.
Taking Jonah’s suggested code above I was trying to find the right tags to create the title of the page for ‘grid’ to be “Monthly Calendar”, for ‘event lists’ to be the category of the list , for the ‘single day’ I was hoping for “Events for (insert date)”. I attempted to use the_title() for each of the conditional statements (except for grid view) since that view was not changing and the above code was fine. But that might not be the right tag. wp_title() would be good but it leaves a separator on the page titles that I dont want and also includes “upcoming events” in the list view that I dont want there either.
The event list view however returns the title of the first event in the list. For single day if there is no event that day it is blank. I could not get “Single Event” text to ever appear on a page, I am assuming that is overridden by the ecp-single-tempate.php? So if that conditional statement needed?
Is there another tag that I dont know about that I should be using instead of the_title()? I tried tribe_meta_event_category_name() but that didn’t seem to help either.
I hope this all make sense…Thanks in advance you guys for helping me with this.
February 28, 2012 at 7:58 am in reply to: Displaying Custom Field Attributes on Frontend in Custom Template File #15856Ken
ParticipantThanks for the the info guys. After I updated to 2.0.4 I had the same issue. I changed the core and all is working again.
Ken
ParticipantHi Rob, After I updated with the official downloads for free and pro versions the issue went away.
I however, was also tweaking code and dealing with custom post types; so it’s possible that it was just something on my end, and not from the download link you sent me for the pre-released version.
I will let you know if it happens again.
Ken
ParticipantThanks Jonah, That makes sense for displaying the title I think that I can get it figured out. I’ll have to look into the breadcrumbs more…
I Do notice now (Since the Upgrade) that on my event list pages the first event has the title of the page instead of the event…If have events pagenated and when I click the second page the first event also is rendered with the title of the page as well.
Ken
ParticipantHi Rob,
Thanks for the link to the download as well as the code.
It does allow me to change the grid view to include the text that I want.
However, on the list view I still see “calendar of events >” before the event category. I want to remove that link so that it reads just the event category. Even if I use CSS to display:none for the h1 a tag the “>” is still going to be visible. Is this a ecp-page-template.php file modification?
One additional think I noticed is that when you click on the number for a specific date (lets say the “28” for the month of Feb.) in grid view. The follow up page uses the same h1 title as the grid view now, which may not be relevant.
Would it be possible to have more useful information like “Events for the day of Feb 28, 2012”? Would that be possible by just be using the function you supplied and adding a conditional tag? The head tag has the title tag doing this in the top of the browser window, so it seems like it should be doable…
Ken
ParticipantHi Rob,
Great job of deciphering my post. Yes I was wondering what the front end would display if I set up a event for us in the WC if someone on the east would see it 3 hours later.
So I added the code:
echo tribe_get_start_date( null, false, 'g:i a' ); - echo tribe_get_end_date( null, false, 'g:i a (T)' );
To give me the output:
10:00 am - 11:30 am (PST)That will show the users in different timezones that we are basing it off of Pacific Standard Time.
Still wondering what the “null, false,” parameters are for, any clue? Are they necessary?
Ken
ParticipantReggie, I found that if I add this to the list view it will add the time zone like Rob mentioned.
echo tribe_get_start_date( null, false, 'g:i a T' );
Use standard PHP time code to display what you want:
http://php.net/manual/en/function.date.phpRob, can you tell me what someone on the East Coast would see if they view the list view if I set up a time for the West Coast? Will they see 9am West Coast or 12pm East Coast? Also can you tell me what the “null, false,” callouts do in the above code?
February 14, 2012 at 2:33 pm in reply to: Displaying Custom Field Attributes on Frontend in Custom Template File #15203Ken
ParticipantJust to clarify, I tried all variations: (‘None\r\n’, ‘None \r\n’, ‘None \n’, ‘None \r’, etc.)
I could not edit my comment.
February 14, 2012 at 10:53 am in reply to: Displaying Custom Field Attributes on Frontend in Custom Template File #15176Ken
ParticipantHi Paul. I have checked, recheck and checked again…Here are my results.
I reset the event-meta.php to its default:
$options = explode("\n", $customField['values'])Created an event and published with the initial selection in the dropdown ‘None’.
The var_dump() returned this: ‘None\r\n’
I then put this in my template:
if (tribe_get_custom_field('Duration') !='None'):Unsuccessful.I then tried:
if (tribe_get_custom_field('Duration') !='None\r\n'):Unsuccessful.I then went back to the event-meta.php and changed the line to:
$options = explode("\r\n", $customField['values'])I then went back to the post and updated it with the initial select chosen in order to update the database.
The var_dump() returns this now: ‘None’
I then put this in my template:
if (tribe_get_custom_field('Duration') !='None'):Success!I could not get this to function without modifying the core. I tried all variations: (‘none\r\n’, ‘none \r\n’, ‘none \n’, ‘none \r’, etc.) with the core unchanged. I can only think that maybe you had a modified core file and/or did not re-publish the event to update the value of the custom field in the database? Or I am a complete bonehead and am missing something here (which is highly more likely)
Will this be considered a bug and changed or will I have to make the edits on the event-meta.php file for future upgrades?
Ken
ParticipantThanks guys the second option works like a champ.
February 13, 2012 at 12:37 pm in reply to: Displaying Custom Field Attributes on Frontend in Custom Template File #15093Ken
ParticipantThanks Rob,
Not sure if this is a issue or not, but is there an extra ‘>’ in line #29 before the last php echo call?
-
AuthorPosts
