We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Display Date of Event #10773
    Barb
    Participant

    Hi Tom,
    Geodirectory said “they don’t have a separate key for start_date. We have already task in our todo to allow show start date, end date, start time & end time. It will be in one of our future versions.”

    “Right now to achieve that (show start date) you want do following things.

    1) Add following PHP snippet via plugin or theme functions.php file

    function gd_snippet_190814_output_event_dates( $output, $find_post, $args ) {
    global $post;

    $the_post = ! empty( $find_post->start_date ) ? $find_post : ( ! empty( $post ) && ! empty( $post->start_date ) && $post->ID == $find_post->ID ? $post : NULL );

    if ( ! empty( $the_post ) && ! empty( $the_post->start_date ) && strpos( $args[‘badge’], ‘%%event_’ ) !== false ) {
    $date_format = geodir_event_date_format();
    $time_format = geodir_event_time_format();

    $output = $args[‘badge’];
    $output = str_replace( ‘%%event_start_date%%’, date_i18n( $date_format, strtotime( $the_post->start_date ) ), $output );
    $output = str_replace( ‘%%event_end_date%%’, date_i18n( $date_format, strtotime( $the_post->end_date ) ), $output );
    $output = str_replace( ‘%%event_start_time%%’, date_i18n( $time_format, strtotime( $the_post->start_time ) ), $output );
    $output = str_replace( ‘%%event_end_time%%’, date_i18n( $time_format, strtotime( $the_post->end_time ) ), $output );
    }

    return $output;
    }
    add_filter( ‘geodir_output_badge_field_key_event_dates’, ‘gd_snippet_190814_output_event_dates’, 20, 3 );

    2) Use following shortcodes:

    – For start date: [gd_post_badge key=”event_dates” condition=”is_not_empty” badge=”%%event_start_date%%” bg_color=”#ffffff” txt_color=”#1339f0″ alignment=”center”]
    – For end date: [gd_post_badge key=”event_dates” condition=”is_not_empty” badge=”%%event_end_date%%” bg_color=”#ffffff” txt_color=”#1339f0″ alignment=”center”]

    It makes more sense for us to show the event start date and end date so I’m providing both the shortcodes from Geodirectory.

    Let me know if the snippet and codes do or don’t make sense.

    Thanks!

    in reply to: Display Date of Event #10754
    Barb
    Participant

    We’re using Geodirectory software on WordPress. New Events are entered using the Geodirectory Events plugin. The Event Start Date is a standard field in the Add New Event editor. So yes, I guess it would be considered meta for the event custom post type.

    in reply to: Social color settings #10194
    Barb
    Participant

    Hi Tom,
    Just in relation to the images not loading, we turned off Lazy Load and that seems to have solved that issue, at least temporarily until we figure out why it is an obstacle.

    Thanks for your great Support!

    in reply to: Social color settings #10099
    Barb
    Participant

    Our new site just went live on Thursday evening so the url’s I gave you Wednesday are expired. Besides the social icons color not changing, the featured images aren’t loading on the the pages either:

    https://thelocaldish.com/blog/most-read-stories/
    https://thelocaldish.com/most-viewed-businesses/

    Thanks!

    in reply to: Social color settings #10083
    Barb
    Participant

    The color is set to #8dc151 (green) in the social settings on both lists.

    https://thelocaldish.dbkdev.com/most-viewed-businesses/
    https://thelocaldish.dbkdev.com/blog/most-read-stories/

    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)