• Resolved taylorcode11

    (@taylorcode11)


    I started a woocommerce store and I’m looking to add product publish dates to the items I post. Currently, using a Kadence theme. I used the code below and it worked great. However, I’m looking to make the dates align flush at the bottom/center of the posts. How would I go about doing this? Thank you.

    //WooCommerce Shop Page : Show Product Published Date
        add_action( 'woocommerce_after_shop_loop_item', 'wc_shop_page_product_date', 100 );
        function wc_shop_page_product_date() {
            echo the_date('', '<span class="date_published">Published on: ', '</span>', false);
        }
    
        //WooCommerce Single Page : Show Product Published Date
        add_action('woocommerce_single_product_summary','wc_single_page_product_date',25);
        function wc_single_page_product_date() {
            if (is_product() ) {
                echo the_date('', '<span class="date_published">Published on: ', '</span>', false);
            }
        }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @taylorcode11,

    We’d be happy to take a look at this for you. In order to do that, we’ll need the URL to a product page where you’re running into the problem.

    In order to find a solution, we’ll need to be able to interact with the code on the page.

    Thanks!

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    It’s been a while since we last heard from you, so I’m marking this thread as resolved.

    Hopefully, you’ve been able to resolve this, but we’ll be here if and/or when you are ready to continue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add product post date in woocommerce’ is closed to new replies.