php displaying on events page

Home Forums Calendar Products Events Calendar PRO php displaying on events page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1037115
    Grisha Stewart
    Participant

    I have

    #1037118
    Grisha Stewart
    Participant

    The raw php is displaying on the general listing of all events. This is new with the upgrade to 4.0. The individual pages display fine.

    Is there a way to do a more tag to cut out the other content of the page in the general list? That would be a workaround.

    For example on https://grishastewart.com/events/ look at this event: “BAT Chat – Video Review & More”. You’ll see unexecuted php code. That is true for the shortcodes used as well as the custom php we’ve coded.

    This is urgent. Thanks!

    #1037731
    Brian
    Member

    Hey,

    Thanks for reaching out to us and bringing this issue to our attention!

    We’ve got this bug logged in our internal tracking system and will notify you here as we make progress on this issue. I apologize for any inconvenience that this issue has caused.

    In the meantime, you can fix this issue by making some quick modifications to the core plugin. These changes will get overridden with the next update which will include an official fix to this issue.

    Within the main Events Calendar plugin, navigate to the src > functions > template-tags > general.php file and open it within your preferred text editor.

    Navigate to line #1320 within that file. It should look like:

    $excerpt = wp_trim_excerpt( $excerpt );

    You can change that line to be:

    $excerpt = wp_trim_words( $excerpt, '55' );

    Where “55” is the number of words that you would like the excerpt to be there.

    Let me know if you have any further questions or concerns here.

    Thanks!

    #1037897
    Grisha Stewart
    Participant

    Perfect, thanks! That’s a good workaround.

    That’s good enough for now, although it would be nice if the PHP and other shortcodes that are on the single event post also ran in the page listing all events. When it runs (as it does in the single event posts), it shows different content for users with different types of subscriptions. Is there a way to make that happen?

    For now, I’ve put some buffer material at the top of the post so that shows up okay. But I’d love to be able to say something like “You have registered for this course” in the event listings.

    #1038039
    Brian
    Member

    Hi,

    You can edit the single-event.php file for the List View following our themer’s guide and output the content how you would like.

    https://theeventscalendar.com/knowledgebase/themers-guide/

    We can try to help answer some questions about that, but we are limited in providing support on customizations.

    Thanks

    #1076041
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘php displaying on events page’ is closed to new replies.