Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #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.

    #791705

    My frontpage, with the upcomming event widget

    • This reply was modified 7 years, 7 months ago by emfutte.
    #791941

    Did you forget to answer my question?

    #792227

    Hi 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,
    Victoria

    #793094

    Thanks for that

    postimage

    • This reply was modified 7 years, 7 months ago by emfutte.
    #793184

    Hi,

    To have this modification is necessary to request a freelancer through this link: kriesi.at/contact/customization

    Best regards,
    John Torvik

    #794398

    I 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 EM

    #794876

    Hi EM,

    Did you get it working?
    I see future dates on the widget.

    Best regards,
    Victoria

    #829087

    No, 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?

    #830894

    Hi,

    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,
    Ismael

    #832045

    The 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.

    #834144

    Hi,

    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,
    Ismael

    #835976

    But there was an error in the code (a missing closing tag), that made my site go down – is that fixed?

    #837933

    Hi emfutte,

    You can use the code above and add the missing closing tag.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #848824

    I 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

    #849801

    Hi,

    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,
    Ismael

    #850714

    There 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 PORTFOLIOBOX

    Last time, you helped me, there was a missing closing tag… ???

    #851350

    Hi,

    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,
    Ismael

    #851616

    I 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.
    #852414

    Hi,

    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,
    Ismael

    #852431

    It’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 Futte

    #852488

    Hi,

    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,
    Ismael

    #852494

    Hi,
    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.
    EMFutte

    #852805

    Hi,

    Alright. Thank you for using Enfold!

    Best regards,
    Ismael

Viewing 24 posts - 1 through 24 (of 24 total)
  • The topic ‘Enfold Widget – upcomming Events’ is closed to new replies.