• Resolved schmedi

    (@schmedi)


    I want to display events in the slider. Is it possible to display the event date and time in the slider?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author thehowarde

    (@thehowarde)

    Hello. Yes, you can use the dd-carousel-after-content hook to add a function to get whatever post meta you want. Below is an example of how to get the WooCommerce price. You would just get your post meta from your post id using your custom post type for whatever event you have.

    Plugin Hooks

    function add_wc_price_to_carousel(){
        global $post, $woocommerce;
        $product = wc_get_product( $post->ID );
        if ($product) {
            echo '<p class="price">$' . $product->get_price() . '</p>' ;
            echo '<a href="'.get_permalink( $post->ID ).'" class="btn btn-primary ">Shop Now</a>';
            }
        }
        add_action('dd-carousel-after-content', 'add_wc_price_to_carousel', 10);
    Thread Starter schmedi

    (@schmedi)

    Hello thehowarde, thanks for the prompt reply. It works!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show Event Date in slider’ is closed to new replies.