ThemeShaper Forums » Thematic

[closed]

footer text weirdness

(11 posts)
  • Started 3 years ago by lastraw
  • Latest reply from lastraw
  • This topic is not resolved

Tags:

  1. To have a link on this homepage only, I put this code in my function file:

    //WD link on frontpage only
    function my_footer($thm_footertext) {
    if (is_home() || is_front_page() )
    	$thm_footertext .= ' || site  by <a href="http://www.windesheimdesign.com" target="_blank"> Windesheim Design</a>. ';
    	return $thm_footertext;
    }
    add_filter('thematic_footertext', 'my_footer');

    Everything works fine, except for the news section:
    http://www.integralgroup.com/news/

    weird huh? I just upgraded this site to the newest version of thematic today.

    I'd appreciate any ideas why this is happening,

    Thanks!
    Leslie

    Posted 3 years ago #
  2. looks like its working now yeah?

    Posted 3 years ago #
  3. Nope, the homepage footer text should be
    ©2011 Integral Group || site by Windesheim Design.

    The other pages should have just
    ©2011 Integral Group

    and most of them do, but http://www.integralgroup.com/news/ has
    || site by Windesheim Design

    Posted 3 years ago #
  4. oh, i see it now.
    hmmmmm that is strange.
    you checked the template you used for news? did you ever hardcode anything?
    other than that, at a loss i'm afraid.

    Posted 3 years ago #
  5. Thanks for taking a look. Here's the template I used for the "News" pages.

    <?php
    /*
    Template Name: Top Stories
    */
    ?>
    <?php
        // calling the header.php
        get_header();
    ?>
    	<div id="container">
    		<div id="content-single">
                <?php the_post();
    
                // action hook creating the single post
                thematic_singlepost();
    
                // create the navigation below the content
    			thematic_navigation_below();
                ?>
    <?php
    // enter the IDs of which categories you want to display
    $display_categories = array(36);
    foreach ($display_categories as $category) { ?>
    <?php query_posts("showposts=1&cat=$category");
    	    $wp_query->is_category = false;
    		$wp_query->is_archive = false;
    		$wp_query->is_home = true;
    		 ?>
    <?php while (have_posts()) : the_post(); ?>
          <div class="entry-content"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"></a>
     <a href="<?php the_permalink() ?>" rel="bookmark" class="title">
          <?php
    // this is where title of the article gets printed
    	   the_title(); ?></a></h2><br />
           <?php
    // this is where the article gets printed
    	 the_content();  ?><br /></div>
          <?php endwhile; ?>
        <?php } ?>
      </div>
      <!-- #content-single -->
    <!-- #container -->
            </div>
       <?php
        // calling the standard sidebar
        thematic_sidebar();
           // calling footer.php
        get_footer();
    ?>
    Posted 3 years ago #
  6. this is a weird one.
    i notice the inclusion of collapsing categories on the news page. have you tried disabling the plugin and check if it makes any difference?

    Posted 3 years ago #
  7. If that plugin doesn't work for this site I would have to shoot myself now :)

    Posted 3 years ago #
  8. Interesting— I just turned off collapsing categories and it shows what is supposed to be on the homepage only

    ©2011 Integral Group || site by Windesheim Design

    but not what should be on the rest of the pages

    ©2011 Integral Group

    Posted 3 years ago #
  9. what if you used get_posts instead of query_posts. it could be that in messing w/ the query, the site doesn't know what page it is on at the moment?

    it is a very similar foreach loop. check this for a good example.

    http://codex.wordpress.org/Template_Tags/get_posts

    Posted 3 years ago #
  10. @helga, it could be. i had a similar problem in the past.

    maybe you should try

    <?php wp_reset_query(); ?>

    after

    <?php endwhile; ?>
    Posted 3 years ago #
  11. Thanks guys,

    I changed it to

    <?php
    /*
    Template Name: Top Stories
    */
    ?>
    
    <?php
    
        // calling the header.php
        get_header();
    ?>
    
    	<div id="container">
    		<div id="content-single">
    
                <?php 
    
                the_post();
    
                // action hook creating the single post
                thematic_singlepost();
    
                // create the navigation below the content
    			thematic_navigation_below();
    
                ?>
    <?php
    // by category ID
    $args = array( 'numberposts' => 1, 'category'=> '36' );
    $postslist = get_posts( $args );
    foreach ($postslist as $post) :  setup_postdata($post); ?>
    	<div class="entry-content">
    		<h2><?php the_title(); ?></h2>
    		<?php the_content(); ?>
    	</div>
    <?php endforeach; ?>
      </div>
      <!-- #content-single -->
    <!-- #container -->
            </div>
    
       <?php
        // calling the standard sidebar
        thematic_sidebar();
    
           // calling footer.php
        get_footer();
    
    ?>

    Which is an improvement in that the entire text string is gone (better than the partial), but still wonder why the footer text that should be there isn't?

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.