Bring Your Business to Life › Support › WordPress: Popular Widget Plugin 100K downloads
Forum Replies Created
- AuthorPosts
- November 19, 2013 at 8:53 pm in reply to: Inserting Custom Field Contents into Tab Post Content #55339buegelfreiParticipant
Solved!
It seems that the plugin I was using to create my custom field was the culprit. Once I realized that WP had custom field functionality already built in, I found that adding the following to display_post_tab_content was all I needed to display a WP-generated custom field in tab post content:
$output .= '<span class="myClass">'. get_post_meta($post->ID, 'myCustomField', true) . '</span> ';
(My solution did not work for the custom field created via the plugin which shall remain nameless. Disabled and deleted!)
Thanks again for Popular Widget!
November 15, 2013 at 12:25 pm in reply to: Inserting Custom Field Contents into Tab Post Content #55311buegelfreiParticipantI think I just figured out how to do it. I’ll post my solution here, if it works…
November 13, 2013 at 8:30 pm in reply to: Inserting Custom Field Contents into Tab Post Content #55301buegelfreiParticipantI must be doing something wrong: just working with your starter code, I would expect to see each title get “add something after the title” added to it. Instead, the titles are gone altogether under the “Recent” tab. (The titles are still there under Popular and Commented, the other two tabs that I’m using).
I’ve got this at line 382 in functions.php:
function add_replace_title_on_post_tab( $title ){ $title . "add something after the title"; return $title; }
And this at the last line of the file:
add_filter( 'pop_recent_title', 'add_replace_title_on_post_tab' );
Thanks!
- AuthorPosts