Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi
    Could this be the reason why the coupon box is not showing up on my site?

    I have DIVI theme, WordPress 5.5, WooCommerce Multi-Step Checkout, and Checkout Manager for WooCommerce.

    Best regards
    Krzysztof

    Thread Starter marciniakk

    (@marciniakk)

    In template-tags.php

    I put this line
    echo ‘<p><button>Read more</button></p>’;

    in to

    if ( ! function_exists( ‘loose_entry_meta’ ) ) :
    /**
    * Function to handle displaying entry meta section for multiple post formats.
    *
    * @return void
    */
    function loose_entry_meta() {
    if ( ‘post’ == get_post_type() ) :
    ?>
    <div class=”entry-meta”>
    <?php
    if ( ! is_single() && has_post_format( ‘link’ ) ) {
    // Extracting link from the content.
    $subject = get_the_content();
    $subject = apply_filters( ‘the_content’, $subject ); // WPCS: prefix ok.
    $regex = ‘#<a\s+(?:[^>]*?\s+)?href=[\”\’](.*?)[\”\’]#’;
    preg_match( $regex, $subject, $matches );
    if ( ! empty( $matches[1] ) ) {
    $match = $matches[1];
    echo ‘<span class=”loose-post-format loose-link-post-format”>‘ . esc_url( $match ) . ‘</span>’;
    }
    } elseif ( ! is_single() && has_post_format( ‘quote’ ) ) {
    $subject = get_the_content();
    $subject = apply_filters( ‘the_content’, $subject ); // WPCS: prefix ok.
    $regex = ‘/<cite>.*<\/cite>/s’;
    preg_match( $regex, $subject, $matches );
    if ( $matches && $matches[0] ) {
    $match = $matches[0];
    echo ‘<span class=”loose-post-format loose-quote-post-format”>’ . wp_kses_post( $match ) . ‘</span>’;
    }
    } elseif ( has_post_format( ‘image’ ) ) {
    echo ”;
    } else {
    echo ‘<p><button>Read more</button></p>’;
    loose_posted_on();
    }
    ?>
    </div><!– .entry-meta –>
    <?php
    endif;
    }
    endif;

    Best regards
    Krzysztof

Viewing 2 replies - 1 through 2 (of 2 total)