Archived topic
Website preview like Twitter?
15 replies · Started by Jon on July 4, 2020
Hey guys I don't know what to call it, or what it is called, so I don't know if this has already been addressed or not.
This is what I am wanting to know, and it is possible, because I have seen wordpress websites do it. One posted as an example below.
When you copy and paste a twitter link in to the editor, it fetches a clickable preview of the tweet. Same if you paste a link of a youtube video.
How can a link to a regular url be pasted in and do the same thing and fetch a clickable preview of a website?
For instance. If you look at this post at this website, https://hnewswire.com/there-is-no-actual-law-or-justice-in-the-b-e-a-s-t-system-birth-pains/ You will see several previews of other posts that you click on the headline or url and it opens it.
Is there a setting I am overlooking?
BTW I don't use the new Gutenberg editor, I use the classic editor with TinyMCE Advanced.
Hope I made sense and you know what I am needing to know.
Jon
Hi there,
maybe this article will help?
https://www.wpbeginner.com/plugins/an-automated-way-of-taking-website-screenshot-in-wordpress/
I tried that plugin. It worked, but fetched the whole website instead of a preview with the post headline.
If you're using the Block Editor then try using an Embed block.
David I tried that, and it said it could not embed the url. I don't use that Newfangled stuff. To confusing for this old dog! I am a classic guy!
Here is what I just realized. If you paste into the editor a url from the same domain, it will fetch a preview like I am talking about. Paste a url from another domain and it will only show the url text.
Trying to see if it does it here
https://generatepress.com/forums/topic/website-preview-like-twitter/#post-1351513
Nope, just turns it into a clickable link
We've turned that feature off in the forums.
I believe WordPress will try to fetch a preview, but it can fail (http to https etc..).
This topic might be useful: https://wordpress.org/support/topic/embeds-not-working-on-all-websites/
Well thanks for the suggestions. Maybe one day Wordpress will add that feature in.
Hey guys, I gave up and closed this however I found something and would like input, and perhaps maybe you could add a feature that will automatically do this.
I have permission from a website to publish their posts. I did one just a bit ago and figured I would have to put a link as I figured the url they posted would NOT show up on my website...., but it did. And exactly as I have been wanting in the above posts.
Take a look at the this post on my website https://www.online-ministries.org/current-biblical-locust-plague-july-8-2020/ and scroll to the bottom. You will see the box with the content I am referring to..
Here is the code.
<figure class="wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-strange-sounds">
</figure>
Now, HOW do I get wordpress to add that automatically when I paste a stand alone url from another website. It does it automatically if the url is from a post within the domain.
Yea, I could do it manually, but that takes to much time. Can you guys add a feature to do that, a CSS or something else that could be integrated in to do it automatically?
If so, simple instructions for a simpleton like me! LOL
Which version of WordPress are you using ?
Current version 5.4.2
Hi there,
It should work by default as long as your server is able to communicate with the server you're getting the content from.
For example, I pasted a link from our documentation site (docs.generatepress.com) on my local site (generatepress.local) and here's what happened: https://www.screencast.com/t/jWMW9QShSm
Tom, when you say "as long as your server is able to communicate with the server you’re getting the content from"
How does one know if that is happening? Is there a setting for that?
It should happen automatically. I'm not 100% sure of the inner workings of that feature, but I believe it uses the REST API. If it's not working, it likely means that connection isn't being made.
Thanks Tom.
I did some experimenting and some sites did indeed auto post. All of my websites on my VPS will not communicate with each other. About 1/4 of those I tried did. Thanks for your help. The theme and plugin extra is great!