Forum Replies Created

Viewing 15 replies - 1 through 15 (of 34 total)
  • @jamesosborne Thanks for having a look and confirming the Adsense code looks ok, I will double check the items you mentioned and then just practice some patients. Would like to also add a thanks for all the hard work from the Site Kit team is greatly appreciate and look forward to new updates and features.

    Thread Starter Antscran

    (@antscran)

    Hi Michael,

    Thanks that gave me confidence some of my code worked atleast.

    I ended up reading a little more on child themes as been a awhile. Anyway settled on copy pasting the TwentyFourteen footer.php over to my child theme and making some minor edits and adding the following code snippet below which achieved what I wanted pretty much.

    		<div id="copy-right">
    		<p>&copy; <?php bloginfo('name'); ?> <?=date('Y');?>  - All Rights Reserved</p>
    		</div>
    • This reply was modified 4 years, 10 months ago by Antscran.
    • This reply was modified 4 years, 10 months ago by Antscran.
    Thread Starter Antscran

    (@antscran)

    Hi Etienne,

    I would rather avoid plugins if possible, will keep researching the code and should figure it out eventually pending any further advice on here.

    Cheers,

    Ant

    Hi all,

    Been reading a few post like this one and I possibly have a similar issue as no adverts showing with auto adverts enabled on Google Adsense account. I have had an Adsense account for a few years and have had adverts working fine before this using a app which allowed me to shortcode links into posts. I have removed this app now and want to rely purely on the auto ads and site kit as prefer the idea of a continuously supported Google made App.

    – Enabled adverts and auto adverts on my Google Adsense account

    – Under the Site Kit Settings page, Search Console, Adsense, Analytics and PageSpeed Insights are all connected with green ticks

    It has only been 24hrs since I have completed this and I suspect the adverts take longer to materialise reading other threads, but also hoping the Site Kit support team can have a quick look at my site and tell me if they see any issues?

    I still have the Google Analytics and Adsense code in my Functions.php of my child theme to be placed in the header, so thinking I may need to remove this?

    My webpage is here https://coder-tronics.com/

    Thanks inadvance,

    Ant

    Thread Starter Antscran

    (@antscran)

    Ok, think I have it sorted and for anyone who else has this issue…..

    Follow the FAQ section about adding the code to your Functions.php file, then edit your CSS file and add the follow (some of this is from the FAQ section):

    /* Advanced Random Posts - remove bullets from lists
    -------------------------------------------------------------- */
    /* li */
    .arpw-li {list-style-type: none;}

    list-style-type: none; is the parameter you want, a simple example of this would have really been useful, but great plugin ??

    Thread Starter Antscran

    (@antscran)

    I have sorted the issue now, found that the content.php file I originally used was from Twenty twelve v1.1. I noted we are now on v1.4, so thought I would uses the latest version of the content.php file.

    I added the amendments I had previously made to my custom-content.php file and now it all appears to be working fine!

    Will bring any other child theme files up to scratch in the same way, just incase there is a further issue I have not noted yet.

    Thread Starter Antscran

    (@antscran)

    Glad it helped maybe not exactly as expected, but sure your feedback will help someone else as well.

    Thread Starter Antscran

    (@antscran)

    Paul,

    Thanks and realised now substituted get_template_directory_uri() for get_stylesheet_directory_uri() and created a folder called ‘inc’ in the child theme with my java script files.

    Thread Starter Antscran

    (@antscran)

    I know the issue now just trying to solve, my javascript files were in the main theme folder, as using get_template_directory_uri()

    Thread Starter Antscran

    (@antscran)

    Paul thanks,

    Arh ok, damn see now!

    I remember doing this now planning to migrate them to the child theme folder but never worked how to do it.

    Any chance you could tell me what the code line would be so I can place them in the child theme folder?

    Regards,

    Ant

    Thread Starter Antscran

    (@antscran)

    I managed to implement this by using a custom content.php file, basically created a copy of the content.php with a few minor edits and placed in my child theme folder calling it custom-contenet.php (as only wanted to use it for certain pages). Then using the code in my first post I substituted this line

    <?php get_template_part( 'content', get_post_format() ); ?>

    and placed this is my template.php files that I wanted to display excerpts, which in my case is most of my pages and even archive.php. You can find the line of code to change quite easily in these files as has exactly the same format.

    <?php get_template_part( 'custom-content', get_post_format() ); ?>

    The custom-content.php file can be seen below, as I mentioned it’s basically almost the same as the content.php file, but just edited so it only displays excerpts.

    <?php
    /**
     * The default template for displaying content. Used for both single and index/archive/search.
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
    		<div class="featured-post">
    			<?php _e( 'Featured post', 'twentytwelve' ); ?>
    		</div>
    		<?php endif; ?>
    		<header class="entry-header">
    			<?php the_post_thumbnail(); ?>
    			<?php if ( is_single() ) : ?>
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    			<?php else : ?>
    			<h1 class="entry-title">
    				<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    			</h1>
    			<?php endif; // is_single() ?>
    			<?php if ( comments_open() ) : ?>
    				<div class="comments-link">
    
    				<!-- ** Commented out "leave reply" code as not required -->
    				<?php /* comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); */ ?>
    				</div><!-- .comments-link -->
    			<?php endif; // comments_open() ?>
    		</header><!-- .entry-header -->
    
    		<!-- ** Removed if is_search so excerpt is displayed for all custom portfolio posts -->
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    
    		<footer class="entry-meta">
    			<?php twentytwelve_entry_meta(); ?>
    			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    			<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
    				<div class="author-info">
    					<div class="author-avatar">
    						<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
    					</div><!-- .author-avatar -->
    					<div class="author-description">
    						<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
    						<p><?php the_author_meta( 'description' ); ?></p>
    						<div class="author-link">
    							<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    								<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentytwelve' ), get_the_author() ); ?>
    							</a>
    						</div><!-- .author-link	-->
    					</div><!-- .author-description -->
    				</div><!-- .author-info -->
    			<?php endif; ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post -->

    Hope this helps somebody else!

    Cheers,

    Ant

    Hi,

    I have the same issue, just installed and testing on WordPress 3.5.2.

    Seems like a great idea though and just what I am looking for to clean up errors I make when first creating a site or maintaining.

    Regards,

    Ant

    Thread Starter Antscran

    (@antscran)

    Paul and Alchmyth thank you very much, last code snippet worked perfectly ??

    Thread Starter Antscran

    (@antscran)

    Marked as resolved

    Thread Starter Antscran

    (@antscran)

    Paul,

    Cheers for testing this, and bemused as your code looked fine and now confirmed. Will check my installation as had a weird issue before which I could not solve, re-installed WordPress and the same functions.php file worked perfectly the next time around.

    Cheers,

    Ant

Viewing 15 replies - 1 through 15 (of 34 total)