This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* New Widget area to show ads after post content | basicwp.com/add-adsense-ads-genesis-single-posts/ | |
genesis_register_sidebar( array( | |
'id' => 'ad-after-content', | |
'name' => __( 'Ad After Content Area', 'custom' ), | |
'description' => __( 'This is Ad section after the post content area', 'custom' ), | |
) ); | |
//* Show ads after post content area | |
add_action( 'genesis_entry_footer', 'basicwp_ad_after_content', 2 ); | |
function basicwp_ad_after_content() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Add new widget under header on homepage in Genesis theme | basicwp.com/add-new-widget-genesis-homepage/ */ | |
genesis_register_sidebar( array( | |
'id' => 'homepage-feature', | |
'name' => __( 'Homepage Feature', 'custom' ), | |
'description' => __( 'This is Homepage feature section', 'custom' ), | |
) ); | |
/** Top Homepage feature section */ | |
add_action( 'genesis_after_header', 'news_homepage_feature', 9 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="<?php bloginfo('url'); ?>" method="get"> | |
<?php wp_dropdown_pages('include=532,389,417,450,472,510,502,520 &selected=532'); ?> | |
<input type="submit" name="submit" value="Click here" /> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** set default settings of attachment media box - basicwp.com */ | |
function attachment_default_settings() { | |
update_option('image_default_align', 'left' ); | |
update_option('image_default_link_type', 'custom' ); | |
update_option('image_default_size', 'large' ); | |
} | |
add_action('after_setup_theme', 'attachment_default_settings'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add this to header.php file, also change 82959, 82960 post ids or add more in the code | |
//http://www.basicwp.com/block-adsense-ads-on-specific-posts/ | |
<?php Global $ad_flg; $ad_flg=1; ?> | |
<?php $adsense_blck_post = array(82959, 82960); ?> | |
<?php if (in_array($post->ID,$adsense_blck_post,true)) $ad_flg=0; ?> | |
//add this on single.php where adsense ad is displayed | |
<?php Global $ad_flg; if($ad_flg!=0) { ?> |
OlderNewer