How to get post meta created via Newspaper post option?

Posted in: Newspaper
Post count: 15

Hello, I’ve been using Newspaper for a long time in a website, but recently changed it (now Newspaper is active in another project). My problem is: the new theme obviously doesn’t read Newspaper fields like Source name (“This name will appear at the end of the article in the “source” spot on single posts”) and Source URL. How can I echo this info in my new theme?

I tried “get_post_meta($post->ID,’td_via’, true);”, but it doesn’t work. Thank you!

Post count: 20688

Hi,

In the theme post templates the source and via are called like this
https://www.screencast.com/t/ujZ2AhBBjNo
Main function here – https://www.screencast.com/t/1lMkG9fdg2J
The values are stored for each post in the postmeta table, for example
https://www.screencast.com/t/YN0gvFZFu

The source and via fields are added by the theme, I don’t think these can be used with another theme or made to appear in another theme. Maybe consider using a plugin which has this functionality, if your current theme does not have options.

Thanks

Post count: 15

Ok. I found it studying the database and ended up with my own solution: an if block checking if Newspaper fields exist, and if not, echoing the fields created for my new theme (since I didn’t found out yet how to convert Newspaper old fields to the new one, impossible to do manually in thousands of articles). Thank you.

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