Subtitles – need two variable names from Newspaper

Posted in: Newspaper
Post count: 19

I am starting to use “Nelio Content” to automatically move posts from our WordPress site (BCWorldview.org) to our Medium.com site. What is missing in the transfer is the Subtitle field in Newspaper. Nelio Content gave me the following PHP to make this work, but the variables noted below need to be replaced with the correct Newspaper function names. Can you provide those names so this code will work within the plugin “Snippets”? Thanks…

————–
add_filter( ‘the_nelio_content’, function ( $content, $post_id ) {
if ( ​has_subtitle( $post_id ) ) {
$content = get_the_subtitle( $post_id ) . $content;
}
if ( has_post_thumbnail( $post_id ) ) {
$content = get_the_post_thumbnail( $post_id ) . $content;
}
return $content;
}, 10, 2 );

Note that the functions has_subtitle and get_the_subtitle are functions that I made up. You should check on your theme if similar functions exist or what is the way to recover the subtitle value from the database.
—————-

Post count: 27744

Hello,

The subtitle is stocked in this table wp_postmeta table, in td_post_theme_settings meta key https://prnt.sc/mLKBqrlqeDqW
You can also use, import and export posts from WordPress.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.