Forum Replies Created
-
AuthorPosts
-
tmstudiouserMember
Sridhar, I have the same question as above but want to use this only on category page and not home page.
I added your code to the php file but I could actually see the code at the top of the page. I changed it to display the ad on cat13. Can you look at it and tell me where I went wrong, please. Thanks!
add_action( 'genesis_after_entry', 'google_ad' );
function google_ad() {if ( ! ( is_category(13) ) )
return;global $wp_query;
if(($wp_query->current_post == 0) || ($wp_query->current_post == 1)) {
echo '<div class="adsense">Adsense code here</div>';
}}
tmstudiouserMemberThanks Stephanie! Your first tip was just what I was looking for. I appreciate you taking the time to reply.
tmstudiouserMemberThank you for taking the time to respond. I'll give that a try.
tmstudiouserMemberThank you for your help Brad.
I used this in the simple hooks plugin and it's working.
<?php if(!is_page(672)){ ?> Ad code here <?php } ?>
Thanks again.
tmstudiouserMemberThanks for the reply but it did not work.
Removed code from simple hooks and added this function to sixteen nine functions.php:`function before_loop_banner() {
if(is_single() && !is_page('672'))
echo '<div class="banner-add"><style>
.lovequotescom-c-top { width: 234px; height: 60px; }
@media(min-width: 500px) { .lovequotescom-c-top { width: 468px; height: 60px; } }
@media(min-width: 800px) { .lovequotescom-c-top { width: 728px; height: 90px; } }
</style>
<script async src="**********"></script>
<!-- LoveQuotes.com_C_Top -->
<ins class="adsbygoogle **********"
style="display:inline-block"
data-ad-client="ca-pub-************"
data-ad-slot="**********"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>';
}
add_action('genesis_before_loop', 'before_loop_banner');`August 27, 2013 at 8:35 pm in reply to: Change header image based on position in Sixteen Nine #59152tmstudiouserMemberI would love help on this topic also. On a phone or small device my logo is too large.
tmstudiouserMemberNot sure why the 15 is there, but just removing it gave me an error.
I studied the functions.php file and realized that it should be 'genesis_before_header'.
Changed that, still didn't work until I removed the , 15.
So a combination of these 2 helped me remove the sub nav from the landing page on 2 separate sites using the focus and balance themes.
Here's the working code now.
// Remove header, navigation, breadcrumbs, footer widgets, footer
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
remove_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_before_header', 'genesis_do_subnav' );
remove_action( 'genesis_after_header', 'genesis_do_breadcrumbs' );
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );genesis();
tmstudiouserMemberI put the original home.php file back on the site. That's not the problem. The features at the top show the social icons and the ratings that are supposed to show on excerpts, but the excerpts are not showing anything under the "continue reading".
I can remove the the home.php file altogether and set this up as a traditional blog, but client wants the columns on the home page. That's why I chose this theme with the grid loop. Thanks.
tmstudiouserMemberHere is a copy of the home.php code.
I have changed a couple of things such as # of featured images, grid content limit and the more tag.
Should changing these 3 things cause this? If so, I'll reconsider the changes.
<!--?php
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'focus_grid_loop_helper' );
/** Add support for Genesis Grid Loop */
function focus_grid_loop_helper() {if ( function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 0,
'feature_image_size' => 0,
'feature_content_limit' => 0,
'grid_image_size' => 'grid-thumbnail',
'grid_image_class' => 'alignnone',
'grid_content_limit' => 500,
'more' => __( 'Open Love Quote', 'genesis' ),
'posts_per_page' => 6,
) );
} else {
genesis_standard_loop();
}}
genesis();
tmstudiouserMemberThanks for the reply.
I have already done that, Brad, but I really need it to show up on the excerpts on the home page. Any ideas on how to make that happen.
-
AuthorPosts