Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #871280

    Hi There,

    We created a page and are using the portfolio grid. The problem: All portfolio entries are displaying the same date, which is the publishing date of the page instead of the event date.

    Thanks

    #872385

    Hey elbnetz,

    Thank you for using Enfold.

    That is quite normal because the plugin’s/event’s date info/function in not included in the template files. You have to modify the config-templatebuilder > aviashortcodes > portfolio.php file. Insert the following function in place of the current date function.

    // https://theeventscalendar.com/function/tribe_get_start_date/

    Related threads:

    // https://kriesi.at/support/topic/enfold-widget-upcomming-events
    // https://kriesi.at/support/topic/event-date-in-post-slider-sometimes-displaying-and-sometimes-not/

    Best regards,
    Ismael

    #872950

    Hi Ismael,

    Thanks for your reply. Your answer goes in the right direction, but we are not using the Tripe Event plugin anymore. Instead we tweaked the portfolio post type. For the date we used the following code:

    /* Portfoio Read more + Date */
    add_filter('avf_portfolio_extra', 'avf_portfolio_extra_mod', 10, 2);
    function avf_portfolio_extra_mod($output, $entry) {
    	$output = '<div class="portfolio-new-meta">';
    	$output .= '<div class="portfolio-read-more-link"><a href="'.get_permalink($entry->ID).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"></span></a></div>';
    	$output .= "<time class='date-container minor-meta updated' $markup>"<strong>.get_the_time(get_option('date_format')).</strong>"</time>";
     	$output .= '</div>';
    	return $output;
    }

    What could we use instead?

    Many Thanks for the great support!

    #873533

    Hi,

    Your answer goes in the right direction, but we are not using the Tripe Event plugin anymore

    What is the event plugin that you’re using?

    Best regards,
    Ismael

    #873605
    This reply has been marked as private.
    #874006

    Hi,

    Alright. How do you specify the actual event date for each post items?

    Best regards,
    Ismael

    #874074

    Published date.

    #874452

    Hi,

    Use the “get_the_date()” function instead of “get_the_time()”.

    // https://codex.wordpress.org/Function_Reference/get_the_date

    Best regards,
    Ismael

    #874579

    Thanks, but where should I change this?

    #875027

    Hi,

    Look for this line in the previous filter above.

    $output .= "<time class='date-container minor-meta updated' $markup>"<strong>.get_the_time(get_option('date_format')).</strong>"</time>";
    

    Best regards,
    Ismael

    #875226

    Thanks,

    unfortunatly there is no difference with

    $output .= "<time class='date-container minor-meta updated' $markup>".<strong>get_the_date</strong>(get_option('date_format'))."</time>";

    Cheers,
    T

    #875792

    Hi,
    If I understand correctly you are using the published date to display in your output, but you want to display your event date, yet I don’t see a event date declared in your custom post type?

    Best regards,
    Mike

    #876007

    No we want to display the published date of the custom post type. But it is showing the published day of the page (container) where the “events” are shown within the portfolio module.

    #876488

    Hi,

    $output .= ““;

    The code is invalid. Please post the FTP and WP details in the private field so that we can test it.

    $output .= "<time class='date-container minor-meta updated' $markup>".<strong>get_the_date(get_option('date_format'))</strong>."</time>";
    

    Best regards,
    Ismael

    #876511

    Thanks Ismael for your support!

    #877336

    Hi,

    Where are you setting the actual event date again? The “published date” is the date when the post was created. You should add a custom field for the event date then use that instead.

    Best regards,
    Ismael

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.