ThemeShaper Forums » Thematic


Subsidiary Widgets Dropped on CPT not-singular pages

(10 posts)
  • Started 12 years ago by ridgely
  • Latest reply from sloweye
  • This topic is not resolved
  1. Hi. So on my pages showing custom post types my subsidiary widgets get dropped, but they show up everywhere else. I'm not using any Widget Logic/Widget Context plugins.
    I am using and I have all thematic-specifics defined true.

    As you can see here and here: Magic Disappearing Act. Firebug shows a subsidiary div but there's nothing inside.

    Compare to home page showing footer with all subs intact.

    Checked all interacting plugins, no change regardless. No Widget conditional plugins are installed. Truly stumped. Help!

    Posted 12 years ago #
  2. mrc2407

    Mhhhh.. I have problems with custom post types too... In my case, I can't get to show custom Taxonomies :S

    Posted 12 years ago #
  3. Different issue...your situation is mentioned here, correct?

    Posted 12 years ago #
  4. Hi Ridgley,

    Nice site. It's good to finally get to know you better. I'm the fool for assuming you were a guy all of this time. My brother's name is Ridgley. Anyway, what does the template or hook you are using look like for your custom post type pages?


    Posted 12 years ago #
  5. Ah, gotcha. Mine is Ridgely (e-l-y) but it's a common misconception. You guys from Maryland by any chance? Also, crap, does the self-portrait seriously look like a dude? Back to the drawing board for me.

    My custom page template is adapted from Devin's type-portfolio.php but I also use Simple Custom Post Type Archives (which enables pagination):

    Here is type-painting.php. The drawing page is almost identical.

    Template Name: Painting
        // calling the header.php
        // action hook for placing content above #container
    	<div id="container">
    		<div id="portfolio" class="paintings">
     				<div class="archive-head"><h1 class="page-title"><span>Painting</span></h1><div class="archive-meta"><p>These are fingerprints of transmutation and the yields of a tangible alchemy. I engage diverse species of paint: oils, ink over tea, watercolor, encaustic, and soon, egg tempera.</p></div></div>
    						$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    						$args = array( 'post_type' => 'painting',
    							   'posts_per_page' => 15,
    							   'paged' => $paged );
                if (have_posts()) : $count = 0;
                while (have_posts()) : the_post(); $count++; global $post; 
    						// displays the page title
    		        thematic_page_title(); ?>
                <div class="portfolio-item painting <?php echo $count; ?> <?php if ($count % 5 == 0) { echo 'last'; } ?>">
    				<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="thumb"><?php get_the_image(array('custom_key' => array( 'Thumbnail', 'thumbnail' ), 'size' => 'thumbnail', 'link_to_post' => false)); ?> </a> 
    				<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="title-overlay"><?php the_title() ?> </a>
                <?php if ($count % 5 == 0) { echo '<div class="clear"></div>'; } ?>
                <?php endwhile; ?> 
                <?php /* Display navigation to next/previous pages when applicable */ ?>
    			<?php if (  $wp_query->post_count > 15 || $wp_query->max_num_pages > 1 || is_paged() ) : ?>
    			<?php if (function_exists('wp_pagenavi') ) { ?>
    				<?php wp_pagenavi(); ?>
    			<?php } else { ?>
    				<nav id="nav-below">
    				<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'themename' ); ?></h1>
    				<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'themename' ) ); ?></div>
    				<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'themename' ) ); ?></div>
    				</nav><!-- #nav-below -->
        		<?php } ?>
    		<?php endif; ?>
    		<?php else: ?>
                <h2 class="title"><?php _e('Sorry, no posts matched your criteria.', 'themename') ?></h2>
                <?php endif;
    			 			// calling the widget area 'page-bottom'
    		</div><!-- #paintings -->
    	</div><!-- #container -->
        // action hook for placing content below #container
        // calling footer.php

    Please let me know what is up.

    Posted 12 years ago #
  6. I think the key here is get_footer();. Not sure why there wouldn't be the standard footer with all the subs intact. Would it make more sense to copy thematic's footer.php and paste it where get_footer(); is now?

    Posted 12 years ago #
  7. Ridgely,

    I tested your template and cannot recreate the disappearing act. Have you tried turning on wp-debug in you config file to see if there is an error somewhere? Set it to log or display errors and that might give you a better idea of what isn't working.

    My family is deeper South. Ridgley is a family name that comes from our Georgia branch. I liked the avatar. If it weren't for the mistaken association to my brother's name, I probably wouldn't have assumed gender.

    Posted 12 years ago #
  8. We're able to replicate this on both a local 3.0.2 install with a child theme of Thematic, and a remote install of 3.1-beta1-16642 with a child theme of Thematic - in our case, we can't get the thematic_sidebar(); to display on an archive-CPT.php page, but sidebars and widget areas work fine on single-CPT.php pages. Source view shows:

    </div><!-- #content -->
    		</div><!-- #container -->
        </div><!-- #main -->
    	<div id="footer">

    where the sidebar should be showing up between the ending container and main divs. No errors display in the error logs, the function thematic_primary_aside does not get called on the archive-CPT.php page.

    If we use the index.php file to render the page (default), the sidebar, etc. works. But when we try to re-route it to use a archive-CPT.php page as the template, the sidebar and widgets don't display.

    We're using a template redirect to an archive-CPT.php page inside the child theme. When it's being used, the widgets are not displaying - so maybe when you redirect to a Custom Template, the widgets don't get registered - so what do we do to register them?

    Putting the dynamic sidebar function in directly makes it display. And using the default TwentyTen theme everything is fine and displays correctly - so maybe it's either a child-theme issue, or a Thematic issue???

    (Sorry, I'm explaining this 3rd-party, so I might be mangling the description of what's happening a bit).

    SO - does anyone have a clue as to what we need to change/add to get the functions for the sidebar/widget areas called?

    Posted 12 years ago #
  9. FIXED IT!

    Added a priority of "12" onto our template_redirect :

    add_action("template_redirect",'CPT_template_redirect', 12);

    Total Deja Vu going on right now - took us only 2 hours to find the priority out this time.... one of these days I'll remember to assign priorities as one of the FIRST troubleshooting things I try...

    Posted 12 years ago #
  10. Thanks cas,

    This fixed missing footer subsidiary asides for me, too. I was having the same problem as Ridgely, above-- but didn't think there were any template redirects anywhere.

    Turns out I was using this code snippet from M. Fields that DOES use a template redirect to turn on template capability for (in my case hierarchical) custom post types.

    Adding a priority of 12 to the redirect did the trick.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.