Home › Forums › Welcome! › Pre-Sales Questions › Featured image in custom loop
- This topic has 4 replies, 2 voices, and was last updated 8 years, 11 months ago by
Support Droid.
-
AuthorPosts
-
May 8, 2017 at 10:06 pm #1280645
Michael James Haggstrom
GuestI am trying to test the functionality of this plugin and on the home page i have this:
$events = tribe_get_events( array(
‘posts_per_page’ => 2,
) );
foreach ( $events as $event ) {
echo “<div class=”>
<div class=’event-img’> NEED FEATURE IMAGE HERE </div>
<div class=’event-text-area’>
<div class=’event-text’>$event->post_title
$event->post_content;
</div>
</div>
</div>”;
}
I am looking to put the feature image in the loop. Can i do that?May 10, 2017 at 11:32 am #1281902Geoff B.
MemberGood afternoon Mike and welcome to the Events Calendar forum!
Thank you for your interest in our products. It’s truly appreciated.
However, please note that we do not offer support for our free plugin in this premium add-ons forum.
But, the good news is that you are still welcome to consult this forum to your liking and browse it for solutions, snippets and tutorials.
If you don’t mind, in the future could you please post your support questions here: https://wordpress.org/support/plugin/the-events-calendar or perhaps consider the purchase of one of our premium plugins to get access to premium support ?
With that in mind, just to set expectations, the scope of our support is mostly to get our customers started on the right track and to help them in case of issues.
We unfortunately do not provide complete support for customization.
You can read about that here: https://theeventscalendar.com/customizations/
If coding is not really your cup of tea, you could always hire one of our recommended customizers to do the customization for you.
Additionally, you might want to check out our the Events Calendar Pro premium add-on, as it would make this much simpler by using our full calendar view embed shortcode: https://theeventscalendar.com/knowledgebase/embedding-calendar-views-tribe_events-shortcode/
Best regards,
Geoff B.
May 10, 2017 at 11:37 am #1281914Michael James Haggstrom
GuestHey, thanks for the info. I am not sure I will buy the pro version unless I know that I can add the feature image into a custom for loop. I would assume that the bit of code that I need would look similar to: $event->post_title. Am I right to assume that there is something? The link you sent it to short codes but short codes to not work in a php loop. Do they?
May 11, 2017 at 3:12 pm #1282603Geoff B.
MemberGood evening Mike,
Thank you for writing back.
I am not sure I will buy the pro version unless I know that I can add the feature image into a custom for loop.
I totally understand where you are coming from.
Perhaps I miscommunicated what I meant.You can include the event’s feature image in a custom loop without the need for the Pro version
echo tribe_event_featured_image( null, 'medium' )However, what I am saying is that we are limited in the amount of support we can offer for customizations. At best, we can get you started (like I just did).
My second comment regarding the Events Calendar Pro is that it looks like your need (the custom loop) could probably be addressed via one of the many shortcodes the Events Calendar Pro offers:
- https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/
- https://theeventscalendar.com/knowledgebase/embedding-calendar-views-tribe_events-shortcode/
I would assume that the bit of code that I need would look similar to: $event->post_title. Am I right to assume that there is something?
Yes, most probably. But alas, as just stated, fixing your custom code is beyond the scope of what we can help with.
The link you sent it to short codes but short codes to not work in a php loop. Do they?
Actually, they could completely replace the need for PHP if you just use them in combination with a page’s content.
If your need are more involved, for the record you can totally trigger a shortcode in a PHP context (look up the do_shortcode function).
Let me know if that helps,
Geoff B.
June 2, 2017 at 9:35 am #1292457Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Featured image in custom loop’ is closed to new replies.
