Archived topic
Secondary title and read bar
5 replies · Started by Matia on October 3, 2020
Hello everybody,
1- I'd like to view, in all my website, the secondary title and not the excerpt for my posts. Is it possible? Is there some featuring in the theme or some external plugins will work?
2- Is it possible have a reading bar when scroll down the single post?
Thanks a lot,
Matia
Hi there,
1. How is the secondary title being added to the post?
2. It would require a plugin - if you search the WordPress repository for Reading Bar - theres a few options available.
Hi David, thanks for your reply.
I tried to add a a subheading with the summary of the article and that works in the homepage but not in the single post. I used, in the past, some plugins and was ok. Right now, I think that plugin "WP subtitle" doesn't work.
Thanks for the 2nd answer!
Matia
Hi there,
If you're using WP Subtitle (https://wordpress.org/plugins/wp-subtitle/), it looks like you need to hook it into the theme.
1. Create a Hook Element: https://docs.generatepress.com/article/hooks-element-overview/
2. Add the content according to them:
<?php
do_action( 'plugins/wp_subtitle/the_subtitle', array(
'before' => '<p class="subtitle">',
'after' => '</p>',
'post_id' => get_the_ID(),
'default_value' => ''
) );
?>
3. Set the hook to generate_after_entry_title (or anywhere you like).
4. Check the "Execute PHP" option.
5. Set your Display Rules.
Let us know if you need more info :)
Thanks for your reply!
You're welcome :)