Comments (3)
Context. The reason I've used this, as you saw, is because titles in navigation menus were getting borked when I didn't run a check against $id
. If I'm on a single post or page with a subtitle, then it keeps showing up in the navigation menu (if the same post or page title is present) unless I run that check. I cribbed it from setup_postdata
, but looking at that function now the variable is simply using $id = (int) $post->ID;
. Let me see what I can come up with. I remember using a vanilla $post->ID
not working so well but let me re-verify.
from subtitles.
Awesome! Thanks for your quick attention, and for providing the context—which apparently slipped my mind when posting.
from subtitles.
I'm now unable to reproduce any need for having $id
checks in Subtitles, so I've removed this check from the plugin. If users report that subtitles show up erroneously in their navigation menus, then I will need to revisit this. But for now, I think the present checks in place, especially the in_the_loop
check that takes place, is more than adequate enough to make sure that subtitles aren't used in nav menus. The only way this would come up is if someone used a navigation menu within The Loop, which isn't good and not something that we'd want to encourage anyway.
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.