Adsense choice

  • Anonymous

    #34788

    Can you activate the child theme now?

    abdl86

    #34789

    Is it activate.

    abdl86

    #34790

    It working now.

    Anonymous

    #34791

    Add this to child-theme’s functions.php file

    Don’t add this to functions.php since the style sheet issue is resolved.

    <?php
    function my_graphene_custom_register_styles(){
    if ( ! is_admin() ){
    wp_register_style( 'graphene-main-stylesheet', get_template_directory_uri() . '/style.css', array(), false, 'screen' );
    }
    }
    add_action( 'init', 'my_graphene_custom_register_styles );

    function my_graphene_custom_enqueue_styles(){
    if ( ! is_admin() ){
    wp_enqueue_style( 'graphene-main-stylesheet' );
    }
    }
    add_action( 'wp_enqueue_scripts', 'graphene_enqueue_styles' );

    Anonymous

    #34792
    Quote:
    It working now.

    Ignore my previous reply then.

    abdl86

    #34793

    Do i need to do that now when it working?

    Anonymous

    #34794

    Wait, what do you want to do?

    abdl86

    #34795
    Quote:
    It working now.

    Ignore my previous reply then.

    I deactivate this to get it to work: WP Minify

    abdl86

    #34796
    Quote:
    Wait, what do you want to do?

    How do you mean?

    Anonymous

    #34797

    Okay, add this to child-theme’s functions.php to have only 2 ads on front page

    <?php
    function graphene_custom_adsense_limit(){
    return 2;
    }
    add_filter( 'graphene_adsense_ads_limit', 'graphene_custom_adsense_limit' );
    ?>

    change return 2 to return 1 if you want to display only one ad.

Viewing 10 posts - 21 through 30 (of 32 total)

  • You must be logged in to reply to this topic.