Results 1 to 10 of 10

Thread: Display ads PHP code file?

  1. #1
    Thread Starter
    Veteran orangemedia's Avatar
    Join Date
    Mar 2012
    Location
    Dordrecht, Netherlands
    Posts
    296
    Thanks
    24
    Thanked 4 Times in 4 Posts

    Display ads PHP code file?

    Hi,

    to integrate WPML I have to add a piece of code;

    'suppress_filters' => true as a parameter to your WP query for displaying ads

    Do you know in what file I can find the code that handles this?

    I thought it was loop-ad_listing.php but this wasn't the one after all.

    Thanks

  2. #2
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    I am not sure where you want to insert this code.Did wpml suggested this? Do you have any example codes for other themes (like twentyten)?

  3. #3
    Thread Starter
    Veteran orangemedia's Avatar
    Join Date
    Mar 2012
    Location
    Dordrecht, Netherlands
    Posts
    296
    Thanks
    24
    Thanked 4 Times in 4 Posts
    Hi Dimitris,

    Does it help if I send you the link from the conversation with WPML? http://wpml.org/forums/topic/theme-l...tion-4/page/2/

  4. #4
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    I think it's better to get an example for the default WP theme (twentyten).

  5. #5
    Thread Starter
    Veteran orangemedia's Avatar
    Join Date
    Mar 2012
    Location
    Dordrecht, Netherlands
    Posts
    296
    Thanks
    24
    Thanked 4 Times in 4 Posts
    I have translated all categories but the ads show up in the default English categories, not in the DUtch ones. So somehow the categories have to be linked so that the same ad linked to a certain categorie is visible in both languages. Actually the rest is working quite good, if these are linked WPML could be used quite easily with CP I think with minimal changes to the source code.

    Because of the fact that the ads give the problem I can't match it with the 2010theme. That theme doesn't work with ads.

  6. #6
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    I am asking for an example for the default theme just to understand better what wpml is suggesting.I can then look for more information about how to apply the same thing in CP.

  7. #7
    Thread Starter
    Veteran orangemedia's Avatar
    Join Date
    Mar 2012
    Location
    Dordrecht, Netherlands
    Posts
    296
    Thanks
    24
    Thanked 4 Times in 4 Posts
    I have sent this to WPML but they now asked the following, maybe that's easier;

    "Harshad wrote:

    Dear Ruben,
    Can you please ask them, what files deals with controlling the ads display.
    So you can paste the code here, other than the code you posted before.



    Post Link: http://wpml.org/forums/topic/theme-localization-4/#post-64138"

    So they only have to know what file handles the ads display.

  8. #8
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    I will try to find more information and get back to you.

  9. #9
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    I spoke with the developer and his reply was to try adding this code in your functions.php file.

    Code:
    function mycp_wpml_integration( $query ) 
    {  
    if( $query->is_tax(APP_TAX_CAT) )    $query->set( 'suppress_filters', true );
    }
    
    add_action( 'pre_get_posts', 'mycp_wpml_integration' );
    Please understand that WPML is not a plugin that is compatible with Classipress 100% and might require extra coding/customization.I am moving this thread to WordPress Plugin Exchange.

  10. #10
    Thread Starter
    Veteran orangemedia's Avatar
    Join Date
    Mar 2012
    Location
    Dordrecht, Netherlands
    Posts
    296
    Thanks
    24
    Thanked 4 Times in 4 Posts
    Thanks, I know it needs some custom work...just one step at a time

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Coupon Code File for Vantage
    By ptyson31 in forum Vantage General Discussion (Legacy)
    Replies: 3
    Last Post: August 22nd, 2012, 02:56 AM
  2. unknown code in php file?
    By muadmz in forum Report ClassiPress Bugs
    Replies: 4
    Last Post: April 15th, 2012, 12:21 PM
  3. Get swf file code
    By leblakco in forum ClassiPress General Discussion
    Replies: 3
    Last Post: March 22nd, 2012, 07:02 PM
  4. how can i add multiple coupon code postings at a time from my Excel file
    By inteletechglobal in forum Help Using Clipper
    Replies: 1
    Last Post: August 6th, 2011, 01:38 PM