bbpress function

Community Forums Forums Design Tips and Tricks bbpress function

This topic is: not resolved

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  nakamoura 1 year, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3558

    nakamoura
    Participant
    Post count: 6

    Hi,

    I asked for support using the get help button and i was asked to post the question here, what i’m doing now!

    I use this code to display adsense ads inside posts and also to exclude some ads from specific categories.

    What i need is to exclude completely adsense ads from bbpress forums and topics too. I tried many functions but can’t get it to work.

    The code i use is:

    <code>
    add_action(‘genesis_post_content’, ‘include_adsense’, 9);
    function include_adsense() {
    if (is_single() && ! in_category( array (’188′, ’189′, ’192′, ’1485′) ))
    require(CHILD_DIR.’/adsense.php’)</code>

    Question?: How to add bbpress function "is_bbpress()” to this code?

    thank you for your help!

    #16249

    SoZo
    Moderator
    Post count: 1573

    Refer to this entry on conditional tags

    if (is_single() && ! in_category( array (’188′, ’189′, ’192′, ’1485′) && ! is_bbpress()))


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16564

    nakamoura
    Participant
    Post count: 6

    Thank Sozo For your help but this tag is not working (does not remove ads from forum) plus i don’t know why it breaks my other adsense in the blog posts.

    I used this tag too : ! bbp_is_forum() but same results

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

You must be logged in to reply to this topic.