Just show featured image shortcode

Home Forums Calendar Products Events Calendar PRO Just show featured image shortcode

  • This topic has 12 replies, 3 voices, and was last updated 6 years ago by Sky.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1508123
    cpetrie
    Participant

    Good morning,

    What would the shortcode be to just show the featured image for a particular category? I am having trouble getting rid of the text. I would like to just show the featured images for all retreats, nothing else – similar to the image below.

    Thank you!

    #1509530
    Sky
    Keymaster

    Hi there!

    I will try to help you figure out how to achieve this.

    It looks like you will need to create a custom template to do this. You can copy the template from the-events-calendar-pro/src/views/pro/photo/single-event.php to [your-theme]/tribe-events/pro/photo/single-event.php and then make your modifications.

    I would use a conditional to check for the category that you want to do this for, and create the desired content inside. We are starting from the “photo” view template, since this already has the featured image displayed nicely.

    Here is the modified template: https://gist.github.com/skyshab/e3b9f16a37e9da7419c3eee915a2d509

    You can just edit to change “my-target-category” on line 24 to be whatever you want to target. Then, your shortcode on the page would look something like:


    [tribe_events view="photo" category="my-target-category"]

    You can read more about customizing Events Calendar templates in our Themer’s Guide.

    Let me know if that helps!
    Thanks,
    Sky

    #1509655
    cpetrie
    Participant

    Hi Sky,

    Unfortunately did not work. I am trying to put it on the home page. It
    keeps giving me the whole calendar. I just want featured images of
    certain events (categories) to show.


    CHRISTINA PETRIE | Website Design/Development
    m: 206-856-0378
    e: [email protected]
    http://www.christinapetrie.com [3]

    Links:
    ——
    [1] https://gist.github.com/skyshab/e3b9f16a37e9da7419c3eee915a2d509
    [2] https://theeventscalendar.com/knowledgebase/themers-guide/
    [3] http://www.christinapetrie.com

    #1510363
    Sky
    Keymaster

    Hello again,

    This is what appears for me using the above steps:

    The search bar and title could also be hidden if desired.

    When you say you are trying to do this on your home page, do you mean the same page that is set for the default Events Calendar settings? Please note that the shortcode can only be used once per page, and not on the same page as the default calendar.

    I am unable to view the site, so I’m not sure what your setup is.

    Thanks,
    Sky

    #1514781
    cpetrie
    Participant

    Hi Sky – I was able to find a workaround using advanced posts. Everything working great except that I can not display the date because it is pulling the date from posted date -see bottom of this page http://jennyalignedyoga.flywheelsites.com/ . Ideally I would like to do the same thing with events calendar – image with extract and date under it. Is that possible with short code?

    #1515708
    Sky
    Keymaster

    Hi there,

    Check out the photo view example: https://wpshindig.com/events/photo/ This is very close to your screenshot.

    You can start with the photo view template, and make any modifications you’d like, such as adding the button, etc.

    Could you explain what you mean by “did not work?” What steps did you take? What result were you expecting? What result did you get? Please provide a screenshot.

    Thanks,
    Sky

    #1515891
    cpetrie
    Participant

    Hi Sky,

    Still having trouble. If I use the following short code [tribe_events view=”photo” category=”classes”] I get the whole list. It is a vertical list. I want a horizontal list that is showing featured images.

    #1516203
    cpetrie
    Participant

    Trying different options and getting nowhere. What am I doing wrong. Keep getting list.

    #1516328
    cpetrie
    Participant

    I decided to forget about working with Events Calendar to do this. Had to find another work around due to time constraint.

    #1516689
    Sky
    Keymaster

    Hi there,

    I’m sorry to hear that you were not able to get this working. If you’d like to continue troubleshooting this, please let us know.

    My guess is that you may not have the photo view enabled in the Events > Settings > Display > Enable event views. Make sure the checkbox for “Photo” is checked.

    Thanks,
    Sky

    #1517347
    cpetrie
    Participant

    Yup. That was the problem. Photo needed to be checked. Pls. close ticket.

    #1517817
    Sky
    Keymaster

    Great!

    Take care,
    Sky

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Just show featured image shortcode’ is closed to new replies.