Community Forums › Forums › Archived Forums › General Discussion › Executive Pro – Change
Tagged: executive pro, expose pro, post_meta
- This topic has 6 replies, 3 voices, and was last updated 10 years ago by leepettijohn.
-
AuthorPosts
-
September 19, 2013 at 9:13 am #63372Regina SmolaParticipant
I am trying to customize the Post Meta on a new install of Genesis 2.0.1 and Executive Pro 3.0.0.
I used the snippet found at http://my.studiopress.com/snippets/post-meta/
Here is what I added to the executive functions.php file:
/** 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="Tags: "]';
return $post_meta;
}}This had absolutely no affect and still shows the default (Filed Under).
Is there a different code I should be using for Genesis 2.0.1?
Thanks.
~ Regina Smola
http://www.wpsecuritylock.comSeptember 20, 2013 at 1:33 pm #63569David ChuParticipantHi,
Interesting question! I believe I found the answer. I tried some code for that, and nothing happened either! First thing that's needed is a priority, if you're running Genesis 2. That's true of a variety of items. Then I found that I had to change your single quotes to straight ones instead of those mac-like leaning ones. ๐ Darn thing still didn't work, and I knew they were shortcodes, so I forced the issue, and voila!add_filter( 'genesis_post_meta', 'sp_post_meta_filter', 20 ); function sp_post_meta_filter($post_meta) { if ( !is_page() ) { $post_meta = do_shortcode('[post_categories before="Category: "] [post_tags before="Tags: "]'); return $post_meta; }}
But wow, way different from the documentation sample for that! To further cloud the picture, there is code to enable shortcodes in that field, but maybe it doesn't always run!
Cheers, Dave
Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers
September 20, 2013 at 6:18 pm #63598Regina SmolaParticipantThanks Dave. That worked.
P.S. I did have straight quotes (not curly) but I forgot to click the "code" button when copying it in the forum here.
~ Regina Smola
http://www.wpsecuritylock.comSeptember 20, 2013 at 7:21 pm #63609David ChuParticipantGreat!
I think I'll add that code bit to my article about that sort of thing. ๐
Dave
Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers
March 3, 2014 at 10:22 am #93219leepettijohnMemberHello,
Can you tell me if this code still works. I "forced" the issue also and got the code to work, but the shortcodes aren't working.March 3, 2014 at 10:22 am #93220leepettijohnMember//* Customize the entry meta in the entry footer add_filter( 'genesis_post_meta', 'sp_post_meta_filter' ,20); function sp_post_meta_filter( $post_meta ) { $post_meta = '[post_date] [post_author_posts_link] [post_categories before=""] [post_comments]'; return $post_meta; }
March 3, 2014 at 10:24 am #93222leepettijohnMember=P Nevermind. Needed to add the do_shortcode function. Thanks for the help. =)
Cheers.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.