I'm using Suffusion 3.8.0. I've created a child theme (ASH) and added a few custom post types in the ASH `functions.php` file. I also created a few `single-customposttype.php` template files. All these work. But, I'm running into difficulties creating a child version of `layouts/layout-blog.php`.
First, will Suffusion use `ASH/layouts/layout-blog.php`, or will it insist on using it's own version? I want to make sure my modifications aren't clobbered by future Suffusion releases.
Second, because my custom post types have multiple custom fields and in some cases custom taxonomies (which is why I declared them in `ASH/functions.php` rather than using the Suffusion form), Suffusion does not seem to want to display them with the usual date box and background. Below is the HTML for a normal post and a custom post. As you can see, the 'title-container fix' div is missing from the custom post as is the 'title' div
Normal post
- Code: Select all
<div id="post-514" class="post-514 post type-post status-publish format-standard hentry category-news tag-magazine">
<div class="title-container fix">
<div class="title">
<h2 class="posttitle"><a title="Farewell FiberArts" rel="bookmark" class="entry-title" href="http://ashguild.ca/archives/514">Farewell FiberArts</a></h2>
<div class="postdata fix">
<span class="author">
Posted by <a href="http://ashguild.ca/archives/author/wslandry">Wendy Landry</a> at 7:48 pm</span>
</div><!-- /.postdata -->
</div><!-- /.title -->
<div class="date"><span class="month">Jun</span> <span class="day">26</span><span class="year">2011</span></div>
</div><!-- /.title-container -->
<div class="entry-container fix">
<div class="entry entry-content fix">
<p>It has just come to my attention that Fiberarts Magazine, published by Interweave Press, is closing after some 30 years of service to textile afficionados. For more information, go to the Fiberarts website, http://www.fiberarts.com/. This link will provide details of how to obtain past articles. The Summer 2011 is the final issue; buy a copy <a href="http://ashguild.ca/archives/514">[...]</a></p>
</div><!--entry -->
</div><!-- .entry-container -->
<div class="post-footer fix">
<span class="tags">Tagged with: <a rel="tag" href="http://ashguild.ca/archives/tag/magazine">magazine</a><br></span>
</div><!-- .post-footer -->
</div>
Custom post
- Code: Select all
<div id="post-564" class="post-564 ash_spinning type-ash_spinning status-publish format-standard hentry">
<h2 class="posttitle"><a title="test spinning sample" rel="bookmark" class="entry-title" href="http://ashguild.ca/archives/ASH_spinning/test-spinning-sample-3">test spinning sample</a></h2>
<div class="postdata fix">
</div>
<div class="entry-container fix">
<div class="entry entry-content fix">
</div><!--entry -->
</div><!-- .entry-container -->
<div class="post-footer fix">
<span class="tags"></span>
</div><!-- .post-footer -->
</div>
So, should I put a conditional in `ASH/layout-blog.php` that detects the post type and uses different output functions for my custom posts? Or, should I extend the `suffusion_after_begin_post()` and `suffusion_content()` functions so they know what to do with my custom posts? I think I'd prefer the latter but I'm not really clear how to go about it.
Perhaps something like:
- Code: Select all
add_action('suffusion_after_begin_post','ASH_after_begin_post');
function ASH_after_begin_post(){
//what should go here?
}
Any thoughts?
Thanks,
Jen, http://ashguild.ca
