Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move links to metadata #113

Open
frankmeeuwsen opened this issue Jun 24, 2019 · 12 comments
Open

Move links to metadata #113

frankmeeuwsen opened this issue Jun 24, 2019 · 12 comments

Comments

@frankmeeuwsen
Copy link

frankmeeuwsen commented Jun 24, 2019

The syndicated links are added to the content of the post. Since it is not actual content of the post but more metadata like author, date, number of words, I would consider moving the list of syndication links out of the content and into metadata for displaying.

This also solves issues where the links are shown in tweets, hidden links cause extra characters in tweets like mentioned in this issue and it keeps it out of the RSS feed.

Also, from a more conceptual point of view, this is extra data that should not be added to the content of the post itself in the display of the post. The author writes the post, the plugin adds information. This information is not part of the post itself but adds metadata to it.

@dshanske
Copy link
Owner

That would require theme support

@frankmeeuwsen
Copy link
Author

So does that mean it is not possible? Or something a theme developer should do? I am not that familiar with the architecture of WordPress to understand what this means.

@dshanske
Copy link
Owner

It can't easily be done by a plugin.

@frankmeeuwsen
Copy link
Author

OK. So what would be another way of using the syndication links but not have any display of it shown in tweets or feeds right now? Is that even possible?

@dshanske
Copy link
Owner

What theme is this?

@dshanske
Copy link
Owner

If it helps, I have two themes I sort of maintain that support it. I think Autonomie does as well

@bekopharm
Copy link

I've the same itch and I'd be perfectly fine with an option to use this as widget in e.g. a sidebar.

@dshanske
Copy link
Owner

dshanske commented Sep 1, 2019

If it is in the sidebar, it wouldn't be inside of h-entry, but it could be rel-syndication, which scopes to the page

@bekopharm
Copy link

How about adding it twice?

First hidden (no texts on link) for machines.

Another time using <q> as described in http://microformats.org/wiki/hatom

any microformat content inside a <blockquote> or <q> element within the Entry should not be considered part of the Entry.
This allows quoting other microformated data without worry of corrupting the model

@dshanske
Copy link
Owner

dshanske commented Sep 2, 2019

At this time, I would rather not repeat. But will think on a solution

@tw2113
Copy link
Contributor

tw2113 commented Dec 27, 2019

I know themes like Genesis have hooks for after post content and the like. I wouldn't be completely surprised if some other popular themes had similar hooks. Perhaps an idea could be provide a spot to specify these hooks, and if there's any value saved, the plugin by default will not run on the_content and instead those fetched hooks.

Quick example that hardcodes. Actual example would fetch the option and parse value appropriately.

$hook = 'genesis_after_content'
add_filter( $hook, array( $cls, 'the_content' ), 30 );

It would rely on the site owner to know what sort of hooks are available with their theme, if any, but it would be a way.

@dshanske
Copy link
Owner

dshanske commented Aug 1, 2020

There is already a setting for hiding the links in your RSS feed. I'm happy to specify alternative hooks, but in my theme, I follow the guidance in the FAQ about removing the content link and adding a new one, but I'll see what I can do to support standard hooks from things like Genesis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants