Child theme not working -need help
-
Hello anyone I was wondering if someone could help me with a problem I am having.
I am using the wootheme called whitelight. I want to change the category page to be like the gopress category page.
I am a first timer at this and a novice at php but.
I installed a child theme which I called custom and made a css file. Everything works fine.
Then I looked at gopress archive page to look at the template file it was using for the archives page..and it says:
<?php get_template_part( 'loop' , 'entry') ?>
So I copy the file loop-entry.php to my custom template”custom” and open it. It looks like this:<?php $count=0; while (have_posts()) : the_post(); $count++; ?> <I></I> <?php //design for pages if ( get_post_type() == 'page') { ?> <div class="loop-entry clearfix <?php if($count =='2') { echo 'remove-margin'; } ?>"> <h2><a href="<?php the_permalink(' ') ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> </div><!-- END entry --> <?php } else { ?> <div class="loop-entry clearfix <?php if($count =='2') { echo 'remove-margin'; } ?>"> <?php if ( has_post_thumbnail() ) { ?> <div class="loop-entry-thumbnail"> <a href="<?php the_permalink(' ') ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('post-image'); ?></a> </div> <?php } ?> <h2><a href="<?php the_permalink(' ') ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="post-meta"> </div> <?php the_excerpt(''); ?> </div><!-- END entry --> <?php } ?> <?php if($count =='2') { echo '<div class="clear"></div>'; $count=0; } endwhile; ?>I then got all the css classes that I needed from gopress and put them in my new custom css.
I then go to my whitelight (perant) theme archive.php file and open it to change it’s scr template. the code looks like this:
`<?php
/* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/get_template_part( ‘content’, get_post_format() );
?>I’m not quite sure what they are telling me to do but I put in this code to link to new src:
<?php get_template_part( ‘loop’, ‘entry’ ); ?>
It does pick up the new format but doesn’t resize images and the main problem is it keeps looping.
Can someone please give me some Please…I really want to know how to do this..Thanks in advance
The topic ‘Child theme not working -need help’ is closed to new replies.