Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Brian

    (@brianjessee)

    Right now you would have to write a loop to do it.

    It is not in the Coupon Creator, but it is something I would like to add one day.

    Thread Starter rkgtech

    (@rkgtech)

    Shoot ok Thanks Brian. Can you point me to the php code please? I will do it myself. Thanks much for the plugin!

    Plugin Author Brian

    (@brianjessee)

    You will have to create a loop using the custom post type:

    cctor_coupon

    And also enqueue the style on that page.

    wp_enqueue_style('coupon_creator_css');

    That is all I can help you with.

    Thread Starter rkgtech

    (@rkgtech)

    Cool thanks much Brian

    i was able to get it working by creating a page template.

    Here’s the code i used. Hope it helps.

    <?php
    			$args = array(
    			'offset'          => 0,
    			'orderby'         => 'post_date',
    			'post_type'       => 'cctor_coupon',
    			'post_mime_type'  => '',
    			'post_parent'     => '',
    			'post_status'     => 'publish');
    			$arrPost = get_posts( $args );
    
    			if(!empty($arrPost))
    			{
    			foreach ($arrPost as $testi)
    			{
    			echo do_shortcode( '[coupon couponid="'.$testi->ID.'" coupon_align="cctor_alignleft"  name="'.$testi->post_title.'"]' );
    			}
    			}					?>
    Thread Starter rkgtech

    (@rkgtech)

    Thanks so much. Now I need to figure out how to create a page template and integrate this into my page ??

    Thanks guys!

    Plugin Author Brian

    (@brianjessee)

    Thanks for the coding. I will try to add in that option in the next version.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to list all coupons in one page?’ is closed to new replies.