-
AuthorPosts
-
May 11, 2017 at 4:01 pm #791703
Hi
I got some GREAT help in here, with making an Enfold Widget – Upcomming Events. It look very nice, but I have a huged problem.
In the widgetarea the date shown is the date, I created the event – not the date for the event. I have no use in showning that date… obviously.
Could you please help me making the widget showing the eventdate instead?
Best Regards.May 11, 2017 at 4:07 pm #791705- This reply was modified 7 years, 7 months ago by emfutte.
May 11, 2017 at 9:50 pm #791941Did you forget to answer my question?
May 12, 2017 at 11:48 am #792227Hi emfutte,
Could you please give us a link to your website, we need more context to be able to help you. Could you reattach the screenshot as well, we don’t see the one above.
Also, if you update the thread by commenting on it, it moves back to the end of the request queue and we don’t get to it as soon as you would want to.
Best regards,
VictoriaMay 14, 2017 at 10:26 pm #793094May 15, 2017 at 8:13 am #793184Hi,
To have this modification is necessary to request a freelancer through this link: kriesi.at/contact/customization
Best regards,
John TorvikMay 16, 2017 at 8:12 pm #794398I really don’t understand this.
You have made a widget, that is showing upcomming events. You have chosen, in the widget, to show a date that has no interest for anybody! Am I the onlys person using this widget?Everybody wants to show the date for an upcomming event in this widget and not the date you created the event!
This must really be a mistake!
Regards EMMay 17, 2017 at 1:42 pm #794876Hi EM,
Did you get it working?
I see future dates on the widget.Best regards,
VictoriaJuly 24, 2017 at 5:29 pm #829087No, I didn’t. The widget was gone, when I came back – I think you erased it. I’m back using the old one, who is working but doesn’t look good…
Could you please help me?July 28, 2017 at 5:57 am #830894Hi,
Please post the code for the upcoming events widget on pastebin.com. We would like to check it. OR find the following line.
echo "<span class='news-time'>".get_the_time($time_format)."</span>";
.. replace it with:
echo "<span class='news-time'>".tribe_get_start_date($time_format)."</span>";
Best regards,
IsmaelJuly 31, 2017 at 10:48 am #832045The upcoming events widget disappeared from my site – I don’t know, how that happend! So I cant post anything from that.
I have put another widget on my front page – it works, but it looks ugly compared with the widgets from enfold.
I need to get the widget back before I can do anything about it.See this: https://kriesi.at/support/topic/the-event-calender-widget-customization/
I believe, you Ismael helped me back then. Please read the hole tread.August 4, 2017 at 5:01 am #834144Hi,
I see. This is the code that we provided.
// https://kriesi.at/support/topic/the-event-calender-widget-customization/#post-783852
As we mentioned, you can’t do this modification in the child theme folder.
// https://kriesi.at/support/topic/the-event-calender-widget-customization/#post-788783
It’s lost after the theme update so you have to redo it.
Best regards,
IsmaelAugust 8, 2017 at 6:24 pm #835976But there was an error in the code (a missing closing tag), that made my site go down – is that fixed?
August 12, 2017 at 3:59 pm #837933Hi emfutte,
You can use the code above and add the missing closing tag.
If you need further assistance please let us know.
Best regards,
VictoriaSeptember 6, 2017 at 8:16 pm #848824I do, I don’t know, where to add the closing tag, and I don’t know where to past the code. Could we start over, with a new code, and some guide too
September 9, 2017 at 4:02 am #849801Hi,
Please add this code in the framework > php > class-framework-widgets.php around line 723 or below the “avia_newsbox” class.
if (!class_exists('avia_upcomingbox')) { class avia_upcomingbox extends avia_newsbox { function __construct() { $this->avia_term = 'tribe_events_cat'; $this->avia_post_type = 'tribe_events'; $this->avia_new_query = ''; //set a custom query here $widget_ops = array('classname' => 'newsbox', 'description' => __('A Sidebar widget to display upcoming events in your sidebar', 'avia_framework') ); WP_Widget::__construct( 'upcomingbox', THEMENAME.' Upcoming Events', $widget_ops ); } } } register_widget( 'avia_upcomingbox' );
Again, you can’t do this modification in a child theme.
Best regards,
IsmaelSeptember 12, 2017 at 12:39 am #850714There is no “avia_upcomingbox” class. in that file, and again,
I get this (as last time, you helped me):Parse error: syntax error, unexpected ‘if’ (T_IF) in /customers/9/1/6/midtmors.dk/httpd.www/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 723
When I put the code between
AVIA NEWSBOX
and
AVIA PORTFOLIOBOXLast time, you helped me, there was a missing closing tag… ???
September 13, 2017 at 5:28 am #851350Hi,
There’s a missing semicolon and I meant “avia_newsbox” not “avia_upcomingbox”. If it’s not working, please post the FTP and WP details here so that we can implement it.
Best regards,
IsmaelSeptember 13, 2017 at 3:53 pm #851616I would really like to be able to do this myself, so I can do it again, after the next update.
YES: The upcomming events wigdet is there now!!
NO: The widget is NOT showing the date for the event, but the date I created the event!
I am trying to follow your instructions on replacing the code:
echo "<span class='news-time'>".get_the_time($time_format)."</span>";
I have found that code 3 times in:class-framework-widgets.php
Line
559
577
1085
I have tried to replace them, but It doesn’t work.- This reply was modified 7 years, 3 months ago by emfutte.
September 15, 2017 at 9:18 am #852414Hi,
Thank you for the update.
Please look for “avianewsbox” class then go to line 559:
echo "<span class='news-time'>".get_the_time($time_format)."</span>";
Replace the “get_the_time” function with the “tribe_get_start_date” function.
echo "<span class='news-time'>".tribe_get_start_date($the_id)."</span>";
// https://theeventscalendar.com/function/tribe_get_start_date/
Best regards,
IsmaelSeptember 15, 2017 at 9:46 am #852431It’s SOOO beutifull – thak you so much, Ismael!
Just one more question!
I might have replaced the code in some of the other lines metioned above, will that cause any problems, and should I change them back to the original.Line
559 – echo “<span class=’news-time’>”.tribe_get_start_date($the_id).”</span>”;
577 -echo “<span class=’news-time’>”.get_the_time($time_format).”</span>”;
1085 – echo “<span class=’news-time’>”.get_the_time($time_format).”</span>”;Is this correct, or how should it look?
Best regards FutteSeptember 15, 2017 at 11:07 am #852488Hi,
No, it won’t cause any problem as long as the “tribe_get_start_date” function is added correctly. Please create a note or a change log of this modification in case you update the theme.
Best regards,
IsmaelSeptember 15, 2017 at 11:25 am #852494Hi,
I already did create a note with the code and the changes, so I can do it myself after an update.
I also asked ENFOLD FEATURE REQUESTS to include the widget in the next update!
Hope to get help from you again another time.
You can close this tread now.
EMFutteSeptember 16, 2017 at 6:44 am #852805 -
AuthorPosts
- The topic ‘Enfold Widget – upcomming Events’ is closed to new replies.