-
AuthorPosts
-
November 1, 2017 at 3:48 pm #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
November 4, 2017 at 4:53 am #872385Hey 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,
IsmaelNovember 6, 2017 at 10:09 am #872950Hi 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!
November 7, 2017 at 5:05 am #873533Hi,
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,
IsmaelNovember 7, 2017 at 11:25 am #873605This reply has been marked as private.November 8, 2017 at 5:42 am #874006Hi,
Alright. How do you specify the actual event date for each post items?
Best regards,
IsmaelNovember 8, 2017 at 9:29 am #874074Published date.
November 9, 2017 at 6:50 am #874452Hi,
Use the “get_the_date()” function instead of “get_the_time()”.
// https://codex.wordpress.org/Function_Reference/get_the_date
Best regards,
IsmaelNovember 9, 2017 at 10:28 am #874579Thanks, but where should I change this?
November 10, 2017 at 6:44 am #875027Hi,
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,
IsmaelNovember 10, 2017 at 5:38 pm #875226Thanks,
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,
TNovember 12, 2017 at 7:29 pm #875792Hi,
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,
MikeNovember 13, 2017 at 9:54 am #876007No 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.
November 14, 2017 at 8:15 am #876488Hi,
$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,
IsmaelNovember 14, 2017 at 9:44 am #876511Thanks Ismael for your support!
November 16, 2017 at 4:12 am #877336 -
AuthorPosts
- You must be logged in to reply to this topic.