Hide expired coupons on homepage

WordPress Business Themes Forums Version 7 Themes CouponPress Hide expired coupons on homepage

Discontinued - The forum content is out of date. For theme support please use our support desk here.

Hide expired coupons on homepage

July 17, 2013
Guido Guido
  • Guido
    Newbie 37 points


    I want the expired coupons to be available after expiry. Therefore I selected the option to move them to different category on expiry. That works, but then they still show up on the homepage (or the next pages). How can I remove them there, and only let them show in the Expired-tab in stores or search.


    July 17, 2013 at 9:15 pm
  • Mark Fail
    Mark Fail
    Super Guru 12,814 points

    its a tricky one since there isnt anyway to know they have expired using basic wordpess queries. You would need to customize the display code to hide or remove the expired coupons from display.

    functions file is found: PPT/class/class_design.php

    July 18, 2013 at 2:45 am
  • Aaron
    Super Guru 922 points

    Get your expired cat ID and add something like this to the query:

    Where 144 is your expired cat ID.

    July 18, 2013 at 3:16 am
  • Mark Fail
    Mark Fail
    Super Guru 12,814 points

    thanks Aaron

    July 18, 2013 at 3:38 am
  • Guido
    Newbie 37 points

    Thanks guys.

    I found an option to exclude some cats @ General Display Options > Category, but that only works for the Category Block on the homepage. The file class_design.php has a lot of code.

    Am I looking for code in */ === VERSION 7 HOME PAGE OBJECTS === ?

    What do I need to change?

    July 19, 2013 at 3:00 pm
  • Guido
    Newbie 37 points

    For anyone else who wants to do this:

    Change rule #2295 in class_design.php





    where XXXX is the category ID you want to hide.

    August 8, 2013 at 12:58 pm
  • YAEL
    Newbie 18 points

    Thanks Guido

    August 8, 2013 at 1:07 pm
  • Mark Fail
    Mark Fail
    Super Guru 12,814 points

    thanks for sharing

    August 8, 2013 at 1:44 pm
  • scott
    Senior Member 247 points

    How would I find the expired category ID?

    October 1, 2014 at 9:47 am

  • Zhuoling
    Newbie 23 points

    I want to know where to find Expired voucher ID too.
    At meanwhile, I am thinking if there is a way to set function such as:
    if a voucher expiry time = 00:00:00, then the voucher should not display, I don’t know how to write a code to work for this, may be someone here can do…

    February 21, 2017 at 11:06 pm
  • Josh
    Super Guru 13,885 points

    Hello Zhuoling,
    Hover over the expired coupon and check left bottom corner of your screen to view listing/coupon id.Its also displayed just below the coupon title.See attached image

    You must be logged in to view attached files.
    February 22, 2017 at 12:56 pm
  • Aaron
    Super Guru 922 points

    Category and Coupon/voucher ID are different.

    If you are not going to display the coupon, why not just move it to draft – it’s built into the theme.

    February 22, 2017 at 10:13 pm
Viewing 12 posts - 1 through 12 (of 12 total)

Didn't find what you were after?

Chat with us now

or contact our support team