Forums

[resolved] Firefox 3.5.3 bug in WP-Andreas-01 theme (3 posts)

  1. writingwell
    Member
    Posted 2 years ago #

    How do I find and fix a theme bug?

    Here's the problem: In the WP-Andreas-01 theme, and the modified version I use on LivingWellNLP.com,

    • Post pages print incorrectly in Firefox 2.8.4. on a Mac.
    • The pages look fine in the browser.
    • They print fine in Safari and Opera 10.
    • The problem affects only post pages. The home page, About page, etc. print fine. (I assume this means the problem is in the post page template.)
    • The problem occurs both with and without a print.css stylesheet.

    The printer glitch:

    1. The headline prints by itself on page 1. (In my modified theme, the author name, post date, and comment count also appear on page 1.
    2. The first page of post content prints on page 2. The rest of the content does not print, even though it shows in the browser window.
    3. The categories and tags print on page 3.

    The CSS on my version of the template validates. The XHTML has one minor error that shouldn't cause printer errors.

    I understand some CSS, but not php. How can I find and fix the printer problem?

    Thanks in advance,
    Joy

  2. writingwell
    Member
    Posted 2 years ago #

    FWIW, here's the code from my (slightly modified) version of the post template:

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    
    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post">
    <h2><?php the_title(); ?></h2>
    
    <p>Written by <strong><?php the_author() ?></strong>, <?php the_time('j F Y') ?><br /><a href="#comments">Comments: <?php comments_number('none','1','%'); ?></a></p>
    
    <div class="contenttext">
    <?php the_content('<p>Read more &raquo;</p>'); ?>
    </div>
    
    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    <p class="postinfo"><strong>Posted:</strong> under <?php the_category(', ') ?>.<br />
    <?php the_tags('Tags: ', ', ',''); ?><?php edit_post_link('[edit]',' | ',''); ?></p>
    
    <div class="navigation">
    <p><span class="prevlink"><?php previous_post_link('&laquo; %link','Previous post',''); ?></span>
    <span class="nextlink"><?php next_post_link('%link &raquo;','Next post',''); ?></span></p>
    </div>
    
    <?php comments_template(); ?>
    
    <?php endwhile; else: ?>
    <p>No matching entries found.</p>
    <?php endif; ?>
    </div>
    </div>
    
    <?php get_footer(); ?>
  3. writingwell
    Member
    Posted 2 years ago #

    Fixed it!

    The problem was in the style.css style sheet:

    .contenttext {overflow:hidden;}

    I fixed it by adding to the print.css style sheet:

    .contenttext {overflow:visible;}

    Apparently Firefox follows style sheets more meticulously than some other browsers...

Topic Closed

This topic has been closed to new replies.

About this Topic