Viewing 30 posts - 1 through 30 (of 35 total)
  • Author
    Posts
  • #767252

    Hello dear people of krisi.at,
    using enfold 4.0, I tried to use the magazine element for listings of event categories from the wp events manager plugin. Actually I can choose the right taxonomy and the events are listed, but not with the event date but with the creation date, which, in this case, leads to a long list of entries with the same date, since I created them on the same date. To be able to show the event date instead of the creation date, would be most useful because I could avoid to use the somewhat unpleasant plugin’s styling tools. Instead the theme’s layout would apply. Can you please help me with a piece of code to fix this?
    Greetings and thanks in advance :D

    #768071

    Hey RonTek,

    Please use a child theme – http://kriesi.at/documentation/enfold/using-a-child-theme/ to make your changes update proof and then refer to this post – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/ and move enfold/config-templatebuilder/avia-shortcodes/magazine.php file to your child theme and then edit the file and find

    
    $output .=			"<time class='av-magazine-time updated' {$markupTime}>".$time."</time>";

    and change it to

    
    $output .=			"<time class='av-magazine-time updated' {$markupTime}>".tribe_get_start_date( $entry->ID )."</time>";

    Best regards,
    Yigit

    #769968

    Thank you very much. I tried it several times now and I’m afraid, it does not work. The Moment, I put the changed file to the specified folder, the Layout of my page is completely screwed up. :(

    #770055

    Hi,

    Can you please create a temporary WP admin login and FTP login and post them here privately so we can look into it? Also, please point out your testing page

    Best regards,
    Yigit

    #770112

    Hi Ygit, thanks for your fast reply :)

    Greetings, Andi

    #771086

    Hi Andi,

    Sorry for the late reply!
    I just noticed that you are not The Events Calendar therefore the code i posted would not work. Could you please contact plugin authors and ask for the correct code to get event days?

    Best regards,
    Yigit

    #771095

    Hello Ygit,
    I’m sorry, I don’t understand your answer. I use the one, that comes with Enfold 4. This one? http://wp-events-plugin.com/about/
    Best regards, Andi

    #771100

    Hi!

    It is a 3rd party plugin which is not included in Enfold. It must be installed separately by someone else if you have not installed it :)
    Since i do not have much experience with the plugin, please contact plugin authors

    Best regards,
    Yigit

    #771104

    Oha :O…

    seems, like I have screwed up something :(
    So this is the one, you support with the Enfold Layout?

    Events Calendar PRO

    Best Regards, Andi

    #771106

    Hi Andi,

    Yes, it is the one. You can use the free version as well – https://wordpress.org/plugins/the-events-calendar/ :)

    Best regards,
    Yigit

    #771113

    I am, in fact, a complete idiot :D. You can not imagine, how much work I just produced for the bin, by not recognizing I used the wrong plugin. I could scream out loud :(

    Sorry for the work I caused you. I’ll come back, when I have a question regarding the new one.
    Outch and thank you, Andi

    #771118

    Hey!

    No worries at all, please do not feel that way :)
    If you are satisfied with the plugin you are using, you can simply contact plugin author and get the correct code to display events dates which would replace the changes i suggested here – https://kriesi.at/support/topic/events-date-in-magazine-element-not-creation-date/#post-768071

    In any case, if you have any other questions or issues, please feel free to contact us again :)

    Cheers!
    Yigit

    #771207

    Thx for your kind words. The sad thing is, I am not satisfied at all, but did not realize, I was fiddling around with the wrong software AAARGH! :D

    But here is one Question regarding the Plugin “Events Calendar
    Is it possible, to take a Value like Title and Startdate and handle it to a Formfield?
    I would like the customers to be able, to send a request via Email, without having to scroll through an endless list (form element: select element), when they already have chosen the right event. We need to handle the mail request with a form, because there are lots of parameters needed for a proper booking.

    thx in advance, Andi

    P.S.: The hack from earlier this conversation (magazine element) now works fine :D

    #771369

    Hi,

    Please consider using a more advanced contact form plugin such as – https://wordpress.org/plugins/contact-form-7/. You can check out documentation for special mail tags here – https://contactform7.com/special-mail-tags/. You would be able to get the title etc. however i am not really sure if it would be possible for event dates.

    Great, glad changes i recommended worked :)

    Best regards,
    Yigit

    #801651

    Hi Yigit,
    I used the above solution for The Events Calendar and the event dates are coming in great. Thank you for the solution!

    Regarding a directly related issue… can you please provide instructions on how to sort the event calendar posts in the magazine element by the same criteria i.e. by event dates and not the default “creation” or “publish” date?

    I have already added the ascending and descending functions to a child theme functions.php but we’re not able to select sorting by Event Calendar date criteria.

    Thank you!

    • This reply was modified 7 years, 6 months ago by Eric. Reason: typos
    #801720

    Hi Yigit,
    One last related request… how can we modify the date format? Currently it’s only displaying the month and day. Is there an edit to the magazine.php file that will have the posts display the year as well, i.e. September DD, YYYY?

    Thank you!
    Eric

    #801995

    Hi @Eric,

    1- We would be glad to help you with this customization, but at the moment there is no easy way to do this by using a small custom code snippet, so I am afraid its out of the scope of our support.

    But please feel free to request such feature at our feature request system: https://kriesi.at/support/enfold-feature-requests/

    This system allows us to keep track of user suggestions and lets you vote on the feature you would like to see the most. I am afraid though there is no guarantee that a feature will get implemented. If that’s something you really need you can always try to hire a developer for the task :)
    2- Please change the code to following one

    $output .=			"<time class='av-magazine-time updated' {$markupTime}>".tribe_get_start_date( $entry->ID,false, $format = 'l, F j, Y @ g:i A' )."</time>";

    You can find out more about date format here – https://codex.wordpress.org/Formatting_Date_and_Time

    Best regards,
    Yigit

    #817000

    Hi Yigit,
    We were able to accomplish the two changes we needed but unfortunately came across feature creep with the magazine post element and the dates. We were able to update the magazine.php file in the child theme directory with the updated code snippet to show the start date of the Event Calendar plugin posts.

    The only problem is that this changes the date shown for all post used within the magazine post element. Any post that is not of the Event Calendar post type shows today’s date. I guess it’s looking for the Event Calendar start date–which doesn’t exist for normal wordpress posts.

    So, the goal is to continue to use the magazine post element to showcase posts for the Event Calendar and normal wordpress posts but for the former pull start dates of the event and for the latter pull the default publish dates.

    Is there a way to update the magazine.php file to accomplish this? Maybe some kind of boolean script that checks the post type and displays different dates based on post category?

    Thanks!
    Eric

    #818641

    Hi Eric,

    You could try something like this:

    
    if ( in_category('your category name') ) {
        $output .=			"<time class='av-magazine-time updated' {$markupTime}>".tribe_get_start_date( $entry->ID,false, $format = 'l, F j, Y @ g:i A' )."</time>";
    } else {
        $output .=			"<time class='av-magazine-time updated' {$markupTime}>".$time."</time>";
    }
    

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

    #820913

    Thanks Victoria! We’ll give this a shot and let you know how it goes.

    #821073

    Hi,

    Thanks for the feedback. Please let us know how you get on with.

    Best regards,
    Rikard

    #830956

    We’re almost there! It appears that using categories doesn’t work as Event Calendar plugin uses its own post categories. What would the snippet look like if we looked for a tag instead of category? We’re noticing that both WordPress posts and Event Calendar posts share the same tags–just not categories. :(

    What would we put in place of “in_category” to look up the tag of the post to apply the date to? Thanks!

    #832123

    Hi Eric,

    This function might help you

    <?php if ( has_tag('abc')

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

    #833119

    We ended up making the change specifically for the page where we needed the event calendar specific update. This way all other magazine elements used throughout the site would not be affected. Here’s the snippiet of code we placed inthe magazine.php file in the child theme:
    if ( is_page( ‘enter post ID number here’ ) ) {
    $output .= “<time class=’av-magazine-time updated’ {$markupTime}>”.tribe_get_start_date( $entry->ID,false, $format = ‘F j, Y’ ).”</time>”; /* DISPLAYS EVENT CALENDAR DATE */
    } else {
    $output .= “<time class=’av-magazine-time updated’ {$markupTime}>”.$time.”</time>”;
    }

    #833406

    Hi,

    Glad you figured it out and thanks for sharing your solution!

    Best regards,
    Yigit

    #908159

    Hey I had a same issue. I am not using the child theme I am afraid that my changes would be lost. I am using posts for event management but it is coming up with post creation date instead of event date. Also where on posts I can mention the event date ? In context or where ?How can I achieve this ?

    #908748

    Hi,

    Why not follow the solution provided by adding it into your child theme?
    That should solve your issues easily.

    Best regards,
    Basilis

    #908750

    how to add child theme ? Adding this will affect the current changes ?

    #908820

    Hi,

    Please take a look at the documentation

    and let us know if that covers you

    Best regards,
    Basilis

    #1030664

    Hi Enfold Support,
    We noticed that recent updates to Enfold have changed the way Events Calendar by Tribe isn’t showing the proper meta. Ideally we need event posts powered by Events Calendar to show start and end dates (Tribe event date meta) when using the magazine post element instead of post creation dates. The above hack to the functions.php file addressed this. Although the other meta data is showing up now with some issues i.e. the breadcrumbs (author and date separate “/”) now appear when they didn’t before and don’t have any spacing.

    We also noticed that the sorting by Tribe Event Calendar event dates (not post publish dates) isn’t working any longer. We have updated the theme adding the method above to add additional sort function to the magazine post element but the event posts aren’t sorting by the Event Calendar event dates but rather the publish dates.

    Link and login info is provided below.
    Thanks!
    Eric

Viewing 30 posts - 1 through 30 (of 35 total)
  • The topic ‘Events Date in Magazine element (not creation Date)’ is closed to new replies.