Community Forums › Forums › Archived Forums › Design Tips and Tricks › Change "filed under" → custom
- This topic has 3 replies, 2 voices, and was last updated 10 years, 11 months ago by meursault.
-
AuthorPosts
-
May 12, 2013 at 9:47 pm #40613meursaultParticipant
Hello,
This is my website a day after I migrated to Genesis. There's an important thing I wish to do, but I don't know how.
In the News child theme, you have a piece of text at the bottom of posts showing Categories and Tags. E.g., for this post, it says:
Filed Under: Society
Now I have used the WCK plugin to create additional taxonomies. As my website does translations from foreign media, this is what I want the text at the bottom to look like:
This [type] was originally published by [original author] at [publication], and translated into English by [translator].
There are custom taxonomies for each of the terms in square brackets created using the plugin. So, using that post as an example, I want it to read something like:
This Opinion was originally published by Yulia Latynina at Novaya Gazeta, and translated by meursault.
Any tips or ideas on how to do this?
Thanks in advance.
May 12, 2013 at 11:32 pm #40625Brad DaltonParticipantYou can customize the post meta using this code http://my.studiopress.com/snippets/post-meta/#customize
Or you can hook in a line of text using the genesis_after_post_content hook http://genesistutorials.com/visual-hook-guide/ and include a conditional tag so its only displays on custom post types.
Let me know if you want that code and i'll test it first.
How many different post types will you be using?
May 13, 2013 at 1:34 am #40634meursaultParticipantYou can customize the post meta using this code http://my.studiopress.com/snippets/post-meta/#customize
The problem is I can't do that if I don't know the shortcode for it. I don't know what the shortcode is for custom taxonomies created in WCK (or in Post-Meta, which I've also tried). E.g.:
<code> /** Customize the post meta function */ add_filter( 'genesis_post_meta', 'post_meta_filter' ); function post_meta_filter($post_meta) { if ( !is_page() ) { $post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "] [translators before="Translators: "]'; return $post_meta; }} </code>
"translator" is my taxonomy name in the WCK. I've tried obvious alternatives like "post_translator" but none of them work either.
Or you can hook in a line of text using the genesis_after_post_content hookhttp://genesistutorials.com/visual-hook-guide/ and include a conditional tag so its only displays on custom post types.
That's probably not what is needed. I want the meta to appear on all posts.
How many different post types will you be using?
One. The default one, I don't see any need to create different post types. There will be just many different taxonomies to arrange the articles in (1 - Type (opinion/news/video/etc), 2 - Category (the standard category), 3 - Original writer, 4 - Original publication, 5 - The translator).
May 17, 2013 at 7:58 am #41355meursaultParticipantOkay this is the solution I was looking for:
/** Customize the post meta function */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_terms taxonomy="type" before="This " after=" about "] [post_categories before=""] [post_terms taxonomy="writer" before="was originally published by "]
[post_terms taxonomy="publication" before="at "] [post_terms taxonomy="translator" before="and was translated into English by "]. [post_tags before="Tagged: "]';
return $post_meta;
}} -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.