Home › Forums › Calendar Products › Events Calendar PRO › Show Category and Meta Info
- This topic has 6 replies, 3 voices, and was last updated 9 years, 8 months ago by
James Rosnack.
-
AuthorPosts
-
August 18, 2016 at 12:06 pm #1153317
James Rosnack
ParticipantI like that the events I create are able to show up in the front page but it looks just like a regular post listing including a “Read More” link to the event. I would like to be able to show it more like how it is displayed in teh events listings.
I have created a template for the home page so that I can customize it. Is there a way to add a php call in the loop where if it is a tribe events post, to display the tribe-events-event-meta under the post title? this would make my life so much easier and it would show that its an actual event and not another recent post. Id be happy with anyting from pulling in the event meta, to showing it like on the event listings page in list form.
Id love to be able to change the “Read More” to “Get Tix or RSVP” too but its second priority really. I got a great plugin called “Say What?” that allows you to change text in certain code, but as far as the theme is concerned, it thinks its just another post and would change it on every post in the post archives.
Home page: http://naidevsite1.us/
August 18, 2016 at 4:36 pm #1153444Andras
KeymasterHi neuroticartist,
Thanks for reaching out! Let me try to help you with your questions.
Is there a way to add a php call in the loop where if it is a tribe events post, to display the tribe-events-event-meta under the post title?
You could use get_post_type to check if the post type is tribe_events and then show the meta.
Id love to be able to change the “Read More” to “Get Tix or RSVP”
For this I recommend the snippet found in this article in our knowledge base.
Note, the source text that you want to replace is “Find out more” and <span style=”text-decoration: underline;”>not</span> “Find out more »”.
Let me know how these work out for ya.
Cheers,
AndrasAugust 18, 2016 at 4:43 pm #1153445James Rosnack
ParticipantHi Andres, I appreciate the help! To be honest, my level of PHP is more at a copy and past level 🙂
any suggestions on what I might actually put in there?August 19, 2016 at 12:02 pm #1153797James Rosnack
Participantok I enlisted the hel of someone smarter than me. I will post it here as Im sure others might want to do this.
Add this inside your loop that calls for your posts
<?php if(get_post_type() === 'tribe_events') { get_template_part( 'single-templates/blog-1-column/event', get_post_format() ); } else { get_template_part( 'single-templates/blog-1-column/blog', get_post_format() ); }of course you will want to change your get_template tags to what ever it is your theme is using.
August 19, 2016 at 12:03 pm #1153798James Rosnack
Participantthanks for the help!
August 19, 2016 at 2:13 pm #1153855Andras
KeymasterHey neuroticartist,
I am glad to see you were able to figure it out. Thanks for posting the solution here! It will surely help others.
Since it’s marked resolved I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket. We’ll be happy to help.
Cheers,
Andras -
AuthorPosts
- The topic ‘Show Category and Meta Info’ is closed to new replies.
