BUG: Twitter user setting incompatibility with Yoast SEO

Posted in: Newspaper
Post count: 9544

This is properly labeled version of a prior post.

Hi, folks
there is a minor bug, which is a user field conflict with the Yoast SEO plugin which breaks the proper OG tag meta data for the author’s twitter ID for twitter card sharing, etc.

SPECIFICALLY:
Yoast setups a field called “twitter” which needs only the user’s id such as
@userid

While, the theme needs to have the full URL/URI to twitter
http://twitter/userid

PROBLEM:
if we use the full URL with Newspaper in the user > settings > twitter field, in order to have the link work in the author box, we get a broken twitter card meta data with Yoast

conversely, if we leave it as it’s been for quite a long time, with only the @userid in the twitter field, then in Newspaper, in the author box, we get a broken 404 url on every post, which is
/site/name-of-pretty-permalink@USERID

SOLUTION:
While I’ve put in a bug track on github with Joost/Yoast for a possible solution; the fact is many many people are using Yoast – many more than the theme at the moment.

Ideally, you should register a new field “Twitter URL” (e.g., td_twiturl ) in functions.php and then pull the author box meta from the new field and not the pre-existing twitter field.

I am happy to hack the theme to register a new field for our site, however need to know where in your templates/includes/modules I can find the author box loop to pull the new registered author meta field for “twitter URL” in place of “Twitter.”

ALTERNATE OPTION: let me know know to mod the theme to not pull the twitter user meta into the author box, so we can use the @USERID for the Yoast meta pull in the head.

UPSHOT:
right now twitter card meta data for all authors is broken with the theme.

  • This topic was modified 12 years by simchris.
  • This topic was modified 12 years by simchris.
Post count: 780

I will try to merge this with the other thread. Sorry for the delay. I will get back to you when I have a solution.

Post count: 9544

HI, Radu!
I figured you were likely taking a break. I’ve been working every weekend the past 4 months, and am about ready to take a mini-break myself 🙂

Need time to recharge the batteries, and to give the mousing and typing a break.

Post count: 9544

Radu…
fyi, the original field added by YOAST, which I think gets over-ridden by your function, is this:

Twitter username (without @)

I think your functions overrides that to

Twitter

So, I think you are correct that simply using the same methodology as Yoast to just enter

Twitter username (without @) USERID

would be best 🙂

Post count: 780

Hello,
I will fix it today, sorry for the delay again. I’ve fixed the issue with the featured image link but it’s still not done on module 7 (the image does not link to the post 😐 )

Post count: 9544

Hi, Radu
you’re awesome 🙂

BTW: the fix I ended up doing for the “featured image turning into a link” in post was this:

1) under theme customizer, for post, switching on “don’t show featured image”
2) place image in the post at top full size
3) select image as featured image, so it will do thumbnails (sometimes I miss timthumb!)

This way we’d see the main “featured” or “cover image” as we call them, and it would be grabbed by Google News, and not have the link on the image.

Small workaround, but was simplest fix. Obviously for some people that might be too confusing.

I’m basically using the theme on 2 live sites; one is a “real site” and one is a site we’re bringing back from the dead (old site, PublishersNewswire.com … home page not done, and still tweaking stuff and some content from early days is still stuck in a static container which needs stuff pasted into WP; and Ga-Ga.com … where we’re migrating content from couple of old orphan sites we had and also doing new content, and hope to have both up to speed for 2014 …). PNW is in Google News and has been live for “almost” 10 years, but was a bit neglected the past 18 months, so bringing it back to life, and yours is the third or fourth theme in 2.5 months, and looks like the winner 🙂 kudos!

Post count: 39

Hi there, I need a solution to this Twitter link issue for the author bio as well. Neotrope, can you please walk me through what needs to be changed to fix this so at least the link works on the author page? Thanks!

Post count: 9544

Hi, Irajabi …
simply go to user > setting > and in the Twitter field put the FULL URL to the twitter account, like https://twitter.com/tophersimmons … this way the URL will work on the author page and the author box on the post page.

It will break the YOAST SEO twitter field, which it looks like the theme rewrites/overwrites at the moment.

So, right now in the META in the <head> it would have a bad twitter card link of


@https
://twitter.com/tophersimmons

vs

@tophersimmons

but at least it would work “on the page” for the visitor.

I think Radu plans a fix for this in the next update.

🙂

Post count: 39

Thanks for the clarification Neotrope 🙂 And I go by Luca 🙂 haha

Post count: 9544

Glad to help!

heh … I should probably use my real name Christopher Simmons vs the company name, too, right? 🙂

– Chris

Post count: 39

I tried your solution but apparently it deletes everything but the @ symbol and the last seven or so characters.

Post count: 9544

Well… you may have some other plugin that creates or registers a “twitter” field for managing that data.

In my case I’m using Yoast SEO, NOT using Jetpack, and in my user’s account setup, I put in the full URL, and it shows up on both the author page and the posts with correct link.

by way of example:
see this old article on the site in progress to revamp with Newspaper:

post:
http://publishersnewswire.com/2013/08/29/PNW2766_163853.php/whilly-bermudez-talks-new-illustrated-childrens-book-wb-10-good-things/

note link on page is:
https://twitter.com/tophersimmons

on author page/index
https://twitter.com/tophersimmons

and on the post in the head meta data, note the bug

<meta name=”twitter:site” content=”@neotrope”/>
<meta name=”twitter:domain” content=”Publishers Newswire”/>
<meta name=”twitter:creator” content=”@https://twitter.com/tophersimmons”/>
<!– / Yoast WordPress SEO plugin. –>

In my user account I have this in the twitter field:
https://twitter.com/tophersimmons

I’m using the latest version of WP, latest version of Newspaper.

Only plugins I’m using are Yoast, WP-Optimize, our house ad module turned off, and I think we have Recaptcha running. Maybe something else, but it escapes me at the moment.

Post count: 39

I agree it’s probably a conflicting plugin and I think I know which one it is.

Post count: 9544

Note … I also have the “force rules” turned OFF in Yoast.. which can sometimes conflict with everything else vs helping ….

Post count: 9544

(and fixed my profile not to show my company name on the forum and went with last name … ! not that anybody cares … )

  • This reply was modified 12 years by simchris.
Post count: 780

The best solution that I could think was to make the theme work with url and id. So we will still have backwards compatibility and we can also make the theme compatible with yoast.

Post count: 9544

Hi, Radu
that does make the most sense; especially since Yoast already creates and registers a Twitter field with label “put userid without @” … it would make more sense to have your functions to create a separate “twitter URL” field (or just “twitter”) if one doesn’t already exist. Obviously you would think that WP core would have the top five web properties already included in the core user setup by now (!).

Viewing 17 posts - 1 through 17 (of 17 total)
You must be logged in to reply to this topic.