Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

What is the custom post ID for Coupons?

  • Matthew
    Matthew
    Senior Member 218 points
    July 25, 2013 at 11:58 am

    I’d like to use an alternative to the themes Popular Post widget, but I need to custom post ID in order to make it work.

    Apprently I’m supposed to change this code

    if(is_single() && !is_page() && empty($mostviewedbars_count_once)){

    Look familiar to you?

  • Matthew
    Matthew
    Senior Member 218 points
    July 26, 2013 at 2:54 pm

    I just want to know the custom post ID for coupons..

    Is it ‘coupon’ ?

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 26, 2013 at 8:47 pm

    I just want to know the custom post ID for coupons..

    I am not sure what are you asking or what are you trying to do and where.
    Post ID is the ID of the post you want to use. Depending on what post you are calling and where are you calling it from the method of getting the ID will be different. If you are inside the ‘loop’ (like on single listing page) the id of that current post/page is often ‘$post->ID’.

    Kind regards,

    Richard

  • Matthew
    Matthew
    Senior Member 218 points
    July 26, 2013 at 10:41 pm

    I’ve bought a plugin that lists popular posts, but it’s not listing any of the themes posts, because i’m guessing they are custom post types.

    I want to know what the custom post type is called for coding sake.. What tag would I use to call a coupon in the php?

  • Aaron
    Aaron
    Super Guru 922 points
    July 26, 2013 at 10:56 pm

    v7 is using the default wordpress post type, eg, coupons are not a custom post type.

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 26, 2013 at 11:00 pm

    Matthew, are you using CouponPress or do you use the Responsive Coupon Theme?

  • Mark Fail
    Mark Fail
    Super Guru 12,822 points
    July 27, 2013 at 3:32 am

    Matthew, the post type in the new responsive themes is ‘coupon_type’

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