Comments (6)
Hi Oliver,
This makes sense. I assume that you've solved this issue by modifying the code on your end? I'm going to leave this Issue open and patch the plugin. It's a good suggestion.
Cheers!
from subtitles.
Hi Philip,
I'm ashamed as I haven't tried it before. I've done it now and it doesn't work actually. I will do some editing and will let you know about the best solution I've come up with in a while ;)
Regards,
Oliver
from subtitles.
Sounds good Oliver. When I have some time I'll do some testing on my end as well. I hope to have some time for the plugin this weekend. Cheers.
from subtitles.
Hi Philip,
I have done some test and it would be actually too complicated to add this functionality into your plugin I guess. I wasn't able to come up with a good solution via changing the code in the plugin. The thing is that the $post
variable is being taken from the first post in the loop. This would then determinate when the plugin return early (depending on whether the first loop post has subtitle set up).
And as you might noticed already, the page_for_posts
heading would be displayed outside the main loop anyway, so the plugin would return early.
But there is a very easy simple solution for this that your plugin already offer. And simplest solutions are the best ;) So, I ended up adding the subtitle to a blog page title with your get_the_subtitle( $page_for_posts )
function. Something like this:
// This is page title outside the main loop if ( is_home() ) { $title .= ' <span class="entry-subtitle">' . get_the_subtitle( absint( get_option( 'page_for_posts' ) ) ) . '</span>'; }
So, thank you for help, but the issue is resolved and I think there is no need to change the plugin for this ;)
Regards,
Oliver
from subtitles.
Awesome Oliver! That's a perfectly fine solution that you've proposed. I like it. :) Thanks for letting me know.
from subtitles.
I should have thought of that also. :-P
from subtitles.
Related Issues (20)
- Subtitle not shared on Facebook and co. HOT 3
- wp_seo_get_bc_title is deprecated HOT 13
- Maybe don't load CSS when 'subtitle_view_supported' filter is set to false HOT 1
- Gutenberg Support HOT 7
- Confirm bbPress Compatibility
- USER question re MarsEdit HOT 2
- Astra theme and comment title HOT 1
- Subtitles in custom page not showing HOT 6
- Not Showing Any More HOT 3
- Can't see subtitle box in Gutenberg HOT 1
- the_title echos both title and subtitle
- Option to keep HTML tags in subtitle fields
- Subtitle field not displaying on Page/Post add/edit form.
- Show subtitles in post loops HOT 2
- Examples
- the_subtitle logic check HOT 2
- Subtitles on Portfolio HOT 4
- multiple subtitles HOT 1
- Feature Request: above OR below HOT 5
- Changing Font Size HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from subtitles.