Results 1 to 6 of 6

Thread: Sequential Banner ads after every 3 records

  1. #1
    Thread Starter
    plusfone's Avatar
    Join Date
    Oct 2013
    Location
    Romania
    Posts
    54
    Thanks
    2
    Thanked 1 Time in 1 Post

    Sequential Banner ads after every 3 records

    1. edit the file 'content-ad_listing.php'
    2. add this line of PHP code around the 11th line right before the '<div class="post-block-out <?php cp_display_style( 'featured' ); ?>">' line

    PHP Code:
    <?php $my_class = ( $wp_query->current_post == && $wp_query->current_post 'my-ads-class' '' ); ?>
    3. Replace the whole line:

    HTML Code:
    <div class="post-block-out <?php cp_display_style( 'featured' ); ?>">
    With this one:

    HTML Code:
    <div class="post-block-out <?php cp_display_style( array( 'featured', $my_class ) ); ?>">
    When done it should look like this:

    PHP Code:
    <?php $my_class = ( $wp_query->current_post == && $wp_query->current_post 'my-ads-class' '' ); ?>
    <div class="post-block-out <?php cp_display_style( array( 'featured'$my_class ) ); ?>">
    4. Last step, instead of using the '.post-block-out' CSS class use the new one that is only displayed on each 3 records '.my-ads-class'

    I tried, does not work ...

  2. #2
    sebet's Avatar
    Join Date
    Oct 2010
    Location
    Portugal
    Posts
    1,491
    Thanks
    138
    Thanked 207 Times in 182 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Checkout my products on the Marketplace.

  3. #3
    Thread Starter
    plusfone's Avatar
    Join Date
    Oct 2013
    Location
    Romania
    Posts
    54
    Thanks
    2
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    sebet's Avatar
    Join Date
    Oct 2010
    Location
    Portugal
    Posts
    1,491
    Thanks
    138
    Thanked 207 Times in 182 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Checkout my products on the Marketplace.

  5. #5
    Thread Starter
    plusfone's Avatar
    Join Date
    Oct 2013
    Location
    Romania
    Posts
    54
    Thanks
    2
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    sebet's Avatar
    Join Date
    Oct 2010
    Location
    Portugal
    Posts
    1,491
    Thanks
    138
    Thanked 207 Times in 182 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Checkout my products on the Marketplace.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Option Show Banner Advertisement on listing after every ads Sequential
    By lultt in forum Banners Galore ClassiPress
    Replies: 6
    Last Post: March 19th, 2015, 11:09 AM
  2. [SOLVED] CSV Import - Only (about) half the records are being imported. (15 max per category)
    By valuser in forum Help Using Vantage (Legacy)
    Replies: 2
    Last Post: November 26th, 2014, 04:15 AM
  3. Replies: 1
    Last Post: July 3rd, 2014, 01:48 PM
  4. Tutorial: How to quickly delete a bunch or unwanted records
    By annonse in forum Vantage General Discussion (Legacy)
    Replies: 5
    Last Post: October 3rd, 2012, 09:50 PM
  5. Creating 1 ad will create 3 records ???
    By junnydc in forum ClassiPress General Discussion
    Replies: 4
    Last Post: November 13th, 2011, 09:05 AM