Home › Forums › Calendar Products › Events Calendar PRO › php displaying on events page
- This topic has 5 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
December 7, 2015 at 1:12 pm #1037115
Grisha Stewart
ParticipantI have
December 7, 2015 at 1:15 pm #1037118Grisha Stewart
ParticipantThe 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!
December 8, 2015 at 9:33 am #1037731Brian
MemberHey,
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!
December 8, 2015 at 4:57 pm #1037897Grisha Stewart
ParticipantPerfect, 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.
-
This reply was modified 10 years, 5 months ago by
Grisha Stewart.
December 9, 2015 at 4:59 am #1038039Brian
MemberHi,
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
February 18, 2016 at 8:32 am #1076041Support Droid
KeymasterThis 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. -
This reply was modified 10 years, 5 months ago by
-
AuthorPosts
- The topic ‘php displaying on events page’ is closed to new replies.
