Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding a Footer container to Entry Meta in Archive Loops
Tagged: Archive Loops, custom post types, Entry Footer
- This topic has 2 replies, 2 voices, and was last updated 9 years, 9 months ago by
marakas.
-
AuthorPosts
-
November 16, 2013 at 6:10 pm #73485
Lord_Devi
MemberHi all,
Ok so I have another issue here I do not know how to resolve... I created a Custom Post Type called "epilator-reviews" for my site.
I got it all working fine, included in my archive loops properly and such. With one exception as far as I can tell. The entries are styled differently in my archive loop than the standard posts.
A standard post in my archive loop has entry meta code that looks like this (Gotten using firebug):
<footer class="entry-footer"> <p class="entry-meta"> <span class="entry-categories"> Filed Under: <a rel="category tag" title="View all posts in Misc" href="http://vainsovain.com/misc/">Misc</a> </span> <span class="entry-tags"> Tagged With: <a rel="tag" href="http://vainsovain.com/tag/review/">Reviews</a> </span> </p> </footer>
In contract, my custom post type seems to be missing the <footer></footer> tags! :
<p class="entry-meta"> <span class="entry-categories"> Filed Under: <a rel="category tag" title="View all posts in Epilators" href="http://vainsovain.com/review/epilator/">Epilators</a> , <a rel="category tag" title="View all posts in Reviews" href="http://vainsovain.com/review/">Reviews</a> </span> <span class="entry-tags"> Tagged With: <a rel="tag" href="http://vainsovain.com/tag/review/">Reviews</a> </span> </p>
So my MAIN question is how do I go about adding the <footer> tags to my custom post type just as the standard post has?
My secondary question.. Does anyone have any good material they could link me to that might help me understand how I can go about theming such things with more control? Looking around the web for such material has proven to be very daunting for me.
I can find things like:
http://wpgenesis.blogspot.ca/2013/04/custom-page-template-in-genesis-child.html?showComment=1384646304588#c7351187565693157643Or
http://www.nathanrice.net/blog/genesis-loop-hooks/
But all I want to do is say "This looks like this now, I need to make it look like that!" and so much of the documentation I find doesn't put their info into quality context for a newbie like me to be able to go from start to finish. 🙁
http://vainsovain.com/blog/January 4, 2014 at 1:00 am #83072marakas
MemberIs there no resolution on this yet? Actually, I'm running into the same issue and very curious on how to resolve this. I also have a custom post type that shows everything except the .entry-footer container.
Any pointers would be greatly appreciated. Thanks!
January 4, 2014 at 2:32 am #83078marakas
MemberThis is not too elegant, but it works. I still don't like it because it's too much of a hack. Hopefully someone can come up with a more elegant solution. I'm sure this is very easy to do.
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); add_action( 'genesis_entry_footer', 'sp_post_meta_filter' ); function sp_post_meta_filter() { global $post; echo '<footer class="entry-footer"><p class="entry-meta">' . '<span class="entry-categories">' . 'Filed Under: <a href="http://vainsovain.com/review/epilator/" title="View all posts in Epilators" rel="category tag">' . 'Epilators</a>, ' . '<a rel="category tag" title="View all posts in Reviews" href="http://vainsovain.com/review/">Reviews</a></span>'; if( $tags = wp_get_post_tags($post->ID) ) { echo '<span class="entry-tags">Tagged With: '; $tags = wp_get_post_tags( $post->ID ); $num_tags = count($tags); $c = 0; foreach( $tags as $tag ) { echo '<a rel="tag" href="http://vainsovain.com/tag/' . $tag->slug . '/">' . $tag->name . '</a>'; $c++; if ( $c !== $num_tags ) echo ', '; } echo '</span>'; } echo '</p></footer>'; }
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.