unwanted large image on each event page

Home Forums Calendar Products Events Calendar PRO unwanted large image on each event page

Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #13655
    Jonah
    Participant

    Hi Giornale, no it will only affect your single events.

    #13661
    giornale di
    Member

    Brilliant – ok sorted … thanks again Jonah … I do have one last question …
    if you look at my front page – http://www.giornaledibarganews.com/

    right at the bottom there is the coming events widget which automatically puts in some text and an image …. I generally have quite a bit of text along with the event ….. most of which I don’t want on the front page. I have been using after the image to stop all that text. Is there a cleaner way of doing this ? Something in the code that will reduce the amount of text in the widget maybe ?

    ciao
    keane

    #13662
    giornale di
    Member

    Stuff got removed from the last comment … it should have read : I have been using the — MORE link — after the image to stop all that text.

    #13665
    giornale di
    Member

    the same problem with the list of events at a venue :

    http://www.giornaledibarganews.com/venue/teatro-dei-differenti-2/

    I would like to restrict some of that text automatically … I can do this with –MORE— but as there will be a number of different people posting events of the calendar, it would be much cleaner if it could be done automatically

    #13686
    Jonah
    Participant

    Hi Giornale, yeah essentially what you’ll want to do is override those widgets by copying the widget files located in wp-content/plugins/the-events-calendar/views or wp-content/plugins/events-calendar-pro/views (for PRO widgets) and place them in the ‘events’ folder in your theme. Then, instead of using the_content() to pull in the events text content you’ll want to use a custom function where you can automatically control the excerpt. I actually use a combination of functions but first copy the following code into your functions.php file: http://pastebin.com/PMf0vKQk

    Then I execute a custom truncating command like so:

    echo restoreTags(trunc(strip_tags(get_the_content(), ''),18));

    You can optionally remove the strip_tags and restoreTags functions but I find them helpful to normalize my excerpts. If you just wanted to use the trunc function do this:

    echo trunc(get_the_content(),18);

    That should get you pointed in the right direction but let me know if you have any other questions.

    #13687
    Jonah
    Participant

    The first line of code got filtered, here’s the full command: http://pastebin.com/LMn3sC7k

    #14779
    nakturnal
    Participant

    Hey, sorry I posted something and then just disappeared. I’m glad they were able to help you out!

    I recall when I looked at your link a while back the large image that was appearing was given a thumbnail class, hence the CSS suggestion. It looks like Tribe’s crew came up with a more efficient way though! Cheers!

    #14803
    Rob
    Member

    Thanks for the follow-up, Nakturnal. Weird that it disappeared but if that happens again let me know and I’ll dig deeper for the “ghost in the machine”, as it may be 🙂

    #15377
    Will
    Participant

    I too would like to prevent the featured image from showing on the event itself. I’ve created the events folder in my theme and placed single.php in there but am unsure how to edit it? Can you guys point me in the right direction?

    #15400
    Jonah
    Participant

    Hey Will, do you have a code editor to open the PHP file? This is what you’ll need to do…

    #15404
    Will
    Participant

    Yup

    #15415
    Will
    Participant

    Sorry, to be more precise, yes I do have a way to edit php files. What is it that I will need to do?
    And thank you again for your support.

    #15453
    Rob
    Member

    Hey Will: just a heads up that I believe Jonah is out travelling today, so you may not get a response here until tonight at the earliest and possibly tomorrow. Wanted to make sure you’re aware.

    #15471
    Jonah
    Participant

    Hey Will, just remove lines 93-96 in single.php to remove the featured image from your events.

    #15518
    Will
    Participant

    HAHAHAHA!!!!!!!!!!

Viewing 15 posts - 16 through 30 (of 31 total)
  • The topic ‘unwanted large image on each event page’ is closed to new replies.