Home › Forums › Calendar Products › Events Calendar PRO › the_content not working on single-event one blog? (multisite)
- This topic has 3 replies, 2 voices, and was last updated 9 years, 7 months ago by Brian.
-
AuthorPosts
-
September 18, 2014 at 5:51 am #750481TorsteinParticipant
Hi,
I have a strange problem on a site where we use multisite for different languages (english and norwegian). The site is live, so I can’t remove all plugins/change to twenty eleven to check for conflicts, but it has worked until recently (the site has been active for about two years).What happens is – if we post an event on the main site, (http://solistkoret.no/) – everything works. When we post the event on the english subsite (http://solistkoret.no/en/) the_content() does not work on the single event page (ex: http://solistkoret.no/en/event/23-09-trondheim-cmf-opening-concert/), but it works on the norwegian main site (http://solistkoret.no/event/trondheim-kammermusikkfestival-apningskonsert/).
I also tried changing from the_excerpt() to the_content() in the list view (http://solistkoret.no/events/ and http://solistkoret.no/en/events/) and it also works there. I tried inserting a small piece of text (“test”) right next to the_content() to make sure it was not a problem with an if/else or something like that, and that also showed up. I also tried changing the language for the english subsite/blog, and it still did not work. I further tried using get_the_content() instead, and on the norwegian site it worked (except all the markup was stripped), but not on the english subsite. I tried using the_excerpt() in single-event.php instead of the_content(), and that also showed up as it should.
September 18, 2014 at 1:27 pm #751444BrianKeymasterHi Torstein,
Thanks for explaining the issue and letting me know about testing for conflicts.
I see what is happening and not sure why there is a conflict on for the English site only.
I came up with this coding to replace the_content.
<?php echo apply_filters('the_content', get_post_field('post_content', $event_id)); ?>
Please make sure to move the single-event.php file to your theme before modifying it.
Instructions for that can be found on our themer’s guide:
https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/
Let me know if that works as a replacement.
Thanks
September 18, 2014 at 2:25 pm #751531TorsteinParticipantAlright! thanks, that worked 🙂
(I already have the files in my theme folder, they are quite heavily modified – and there is also a “private” calendar for internal events (practices++) which is only available for logged in users)September 19, 2014 at 7:23 am #752959BrianKeymasterGreat, glad it helps, I am going to go ahead and close this ticket, but if you need any other on something else please post a new ticket.
Thanks!
-
AuthorPosts
- The topic ‘the_content not working on single-event one blog? (multisite)’ is closed to new replies.