Forum Replies Created
-
AuthorPosts
-
mtombsParticipant
Dear Sridhar,
I've been able to modify your code a little to get exactly what I want. I have disabled the Simple Edits Plugin, and modified your code to:
//* Customize the post meta function to show Tags on Category pages, Categories on Tag archives and both Tags and Categories on single Posts and views other than static Pages add_filter( 'genesis_post_meta', 'sk_post_meta_filter' ); function sk_post_meta_filter($post_meta) { if ( is_category() ) { $post_meta = '[post_tags before="NEW TEXT: "]'; } elseif ( is_tag() ) { $post_meta = '[post_categories before="NEW TEXT: "]'; } elseif ( !is_page() ) { $post_meta = '[post_categories before="NEW TEXT: "][post_tags before="NEW TEXT: "]'; } return $post_meta; }
This has allowed me to modify the default ‘Filed under’ and ‘Tagged with’ text.
Many thanks for your help.
mtombsParticipantDear Sridhar,
Many thanks for that.
I tried using the code and it didn't work. Then I started disabling my plugins to see if that helped. As soon as I disabled Genesis Simple Edits the code worked a treat.
Is there some way that I can still use Simple Edits with this code? Or, if not, is there a way that I can change the default 'Filed under' and 'Tagged with' text and still use the code. I tried inserting this into my functions.php file, but as soon as I did your code stopped working:
`//* Customize the post meta function
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
function sp_post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_categories before="Category: "] [post_tags before="Tag: "]';
return $post_meta;
}}Is there any way round this?
Michael
mtombsParticipantDear Sridhar,
Many thanks for your help. That worked a treat!
Michael
-
AuthorPosts