Add fixed text to every post.

Posted in: Newspaper
Post count: 69

1) I’d like to add a text at the bottom of each article like “If you find our content usefull please XYZ..” I’ve been looking at post settings but don’t see any way I can do it. How should I ?

2) Your theme allow us to show the “share to fb” buttons below / above articles. Is there a way via shortcode for example to customize this further? Example to add a “share to fb” inside a text or other places?

Thank you

Post count: 9544

1) couple of ways:
a) add a filter in WP to add text at end of the post meta for every article; would need to google that; as you’d add a bit of code to your functions.php

b) use ACF – advanced custom fields; create a field, with default text, which you could customize per post; then insert shortcode for the custom field in your theme template(s) at bottom of the post loop

(( I don’t work here; just couple of ideas. ))

Post count: 69

Hi Chris, thanks for the tip. But I think that your methods would cause problems as the theme is updated. We’d loose the custom stuff.. So I try to do things in according with “best practices” of the theme )) Or use a standard plugin that don’t break the theme in any way.

Post count: 9544

Yes. Most of us basically take the mods, add them to our own WP plugin to avoid any issues with theme updates. For some stuff we edit the core files, and keep track of that and then make same changes after next update.

There is a theme hook I think to “insert code at end of the post” — but if not, plenty of plugins that do that. By default WP supports inserting stuff “after the post” which is how most plugins are able to do that.

If you figure out the function, you could make your own plugin, also if not wanting to edit the theme files.

Still, good to learn how to edit core files, and track that, for stuff like minification, removing hooks to things not used, moving to web-safe fonts, or whatever.

Anyway – food for thought 🙂

Post count: 13

We want to add custom fields to post types.

Think we will use Advanced Custom Fields (https://en-gb.wordpress.org/plugins/advanced-custom-fields/). However, is this plugin compatible with Newspaper 8?

Post count: 20688

Hi,

You can try it and see if it works for you. Follow the plugin instructions and check the results. It could require modifications to the post template files. These are found in the main theme folder
https://www.screencast.com/t/6LxMtUXQ
We have not tested this plugin with the theme, but you can install it and see if it is working properly. Alternatively you could search for other plugins that have the options you need and try them as well, if this one is not working fully.

Thanks

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