Home › Forums › Pro Support › WPSP Social Links
- This topic has 7 replies, 3 voices, and was last updated 2 years, 9 months ago by
Tom.
-
AuthorPosts
-
November 30, 2020 at 11:48 am #23455
David
ParticipantHi,
When I run Lighthouse I encounter errors whenever I include the social links in a WP Show Posts list.
To make sure this is clear I made a short video here:
https://www.dave4math.com/how-math-help-works/
Thank You
November 30, 2020 at 7:44 pm #23465elvin
ModeratorHi,
I don’t see any videos or video links on the site. (and/or on your reply above if you intended to add one.)
Also, I don’t see any errors on my end. Can you explain in more detail? Perhaps an image of the error? Thank you. π
November 30, 2020 at 8:00 pm #23471David
ParticipantHere is the link:
December 1, 2020 at 11:08 am #23542Tom
KeymasterHi there,
Thanks for reporting this. Fixed the Pinterest thing in the next update. For now, you can change the source code if you’d like.
Go to
wp-content/plugins/wp-show-posts-pro/social-sharing/social-sharing.php
and find line:191
You’ll see this:
if ( isset( $pinterestURL ) && $pinterest ) { printf( '<a title="%1$s" class="wpsp-social-link wpsp-pinterest" href="%2$s" %3$s"> <span class="screen-reader-text">%4$s</span> </a>', esc_attr__( 'Pinterest','wp-show-posts-pro' ), esc_url( $pinterestURL ), 'target="_blank"', __( 'Pinterest','wp-show-posts-pro' ) ); }
Replace it with this:
if ( isset( $pinterestURL ) && $pinterest ) { printf( '<a title="%1$s" class="wpsp-social-link wpsp-pinterest" href="%2$s" target="_blank" rel="noopener noreferrer"> <span class="screen-reader-text">%3$s</span> </a>', esc_attr__( 'Pinterest','wp-show-posts-pro' ), esc_url( $pinterestURL ), __( 'Pinterest','wp-show-posts-pro' ) ); }
The other issues with the FB and Twitter links are because those aren’t actually links – they open a small window using javascript instead of linking to a whole new page.
Let me know if you need more info π
December 1, 2020 at 11:20 am #23550David
ParticipantThank You
December 2, 2020 at 12:34 pm #23655Tom
KeymasterYou’re welcome π
December 9, 2020 at 11:42 am #24050David
ParticipantHi Tom,
TOM: The other issues with the FB and Twitter links are because those arenβt actually links β they open a small window using javascript instead of linking to a whole new page.
Is there any way we can fix this issue?
e.g.
https://github.com/GoogleChrome/lighthouse/issues/10590If they are not actually links (you said above) then why are you using in the code. Is there another way to write this where I do not lose 8 points on my SEO score (according to Lighthouse).
Can you use buttons for example (instead of anchor tags)?
Thank you for you time.
Dave
December 11, 2020 at 8:40 pm #24154Tom
KeymasterWe could look at buttons, but I don’t believe the current implementation will actually harm your SEO.
You can always look at replacing the social links with another solution if you’re worried about it. We will likely be re-writing the entire feature once we re-write the plugin to work as a block.
-
AuthorPosts
- You must be logged in to reply to this topic.