My main idea is that when i do a google search on my company's info, it keeps showing the latest post made. I would like to make the info the same everytime i do a google search. That will definitely show a good image of my company. I am using wordpress to run my company's website. I need some guidance on this... Thanks... Please pardon me if this is a stupid question. If there is other ways of doing this, instead of using wordpress, do tell me... Will be very happy to hear some suggestions...
This is a great question, and I think that there are a couple ways you could do it.
The first way that came to mind is to use your site's meta description on your home page. Your meta description is the 156 characters that appear in black letters underneath your site title in the search results.
If you want your meta description to be static and unchanging, just like LinkedIn, you can set your meta description without any coding knowledge using Yoast's Wordpress SEO Plugin. After you install it, edit your home page in Wordpress Admin and set the meta description to be your desired text. You can set the meta description for every page on your site, and each one will display the corresponding description in the search results.
If you want your meta description to be the latest post, you will either need to change the meta description for the homepage manually every time you write a new post, or you could write up some code to automatically generate the meta description from the first 156 characters of your latest blog post.
But, there is a second method that might work better. For an example site, I did a Google search for CSSTricks.com. Notice that it appears that Google is automatically pulling in their latest post without them having to do any hoopla with the meta description.
So, I went to CSSTricks using Google Chrome and did a right-click -> Inspect Element to view the source of the web page, to see how they were doing it. (You may need to open the below image in a new tab or save it to your computer to be able to read the code, because it is so small)
They do not have any meta description on their site, but they are using the HTML5 article tag. It appears that Google is pulling in the first p tag nested inside the article tag, and then displaying that as the black text in place of the meta description. So theoretically, if this is indeed how it works, what you need to do is write the markup of your home page so that it displays the post content using the article tag with a nested p tag, just as they have done.
Hope this helps!
Related
I am building a website in Wordpress and I am writing some Articles. When I share my post/article on Facebook, the wrong image appears (on the phone, as on the computer it seems that the image is chosen correctly). I have seen that Facebook needs the og:image tag and it needs to be called in the head metadata. As I do not have many options to add metadata to the page, I felt like using the Custom Fileds in Wordpress as being the cleanest way. As I am new to this and I am not sure I did it correctly, please guide me on how to call these custom fileds to the head metadata part of my page when it loads. I have attached a snip of my custom field here:
custom custom field
Please let me know if my thinking was correct or if I should use another method to accomplish this.
Thank you very much.
Hello guys, is there any way to remove the highlighted (meta, date, author and title) when being shared on Facebook? It looks awful and redundant. I tried several plugins, but it also removes the meta on the page which looks really weird and unnecessary.
I just wanted to remove this when I'm sharing it on facebook/social media.
I'm using the Twenty Seventeen Theme by the way. TIA!
Facebook uses something called the Open Graph Protocol to determine what to display when a website is shared. Basically what it is is a set of meta tags you can add to your HTML head to tell Facebook what to show. If you don't have those meta tags in place, it will try to guess, and sometimes it does a bad job, as you are seeing here.
There are a number of plugins out there that can help give you better control over what Facebook shows by setting up the right meta tags for you. Twitter has it's own set of meta tags it uses so I'd try a plugin that handles multiple services. I'd recommend trying out Yoast. It does much more than social media meta tags, but the SEO tools it gives you are pretty great too.
I have an issue in Drupal with getting node content to display itself. I suspect it could have to with the CSS styling, although I'm not 100% sure what's causing the issue.
Background:
So basically I'm trying to setup a blog but I'm running into serious issues trying to simply get the blog posts to display themselves.
I created a custom Drupal 7 theme using the export function of Artisteer (http://www.artisteer.com/?p=overview). A stylesheet called style.css was generated. I put some of my own CSS into this stylesheet along with the parts that were auto-generated. I should mention I did some amount of custom CSS to force the homepage to look the way I wanted.
I followed the instructions from the PDF at (http://learnbythedrop.com/buildingyourblog) to create a blog (great easy-to-follow guide). The most relevant pages for Views are pages 34 - 36, where he takes you through how to create a "Blog Post" view, in order to display your blog content correctly. However, when I got to the point where he created sample blog content and it displayed it's title and main content, this simply didn't work for me. See this link for example (Sample content that I created for testing purposes):
(http://www.productworld.com/blog-posts/2012/06/08/hello)
I can see a list of titles for sample content that I created (under the Recent Posts block), but I can't view any content from the individual blog posts themselves. The page is just blank.
Also, I can't see a list of the titles and teaser links - it should show up under (http://www.productworld.com/blog-posts) but that URL gives me a "page not found" error. This was something that worked in a previous iteration but now does not work.
Here are 2 screenshots of my View settings, in case it's relevant:
http://i.imgur.com/uadew.png
http://i.imgur.com/9yOUk.png
Questions:
What is the likely cause of the blog content not displaying? (If I do a preview of the blog post within the Views section I can see the blog content just fine, it just won't display on the actual page.) Is it styling? Some setting in Views? Some Block setting? I've searched my style.css file and tried commenting out everything to do with "content:hidden" and "display:none" to no avail. I've tried every combination of settings in the blog posts View to no avail. I've tried placing "Main Page Content" and "View: Blog Posts" blocks in various regions, and changing around the settings that restrict where the block can be displayed. The blog post title/body content doesn't show up in the page source at all, which could be a clue. How would I go about debugging such a problem?
Why is www.productworld.com/blog-posts saying "page not found", even though I've specifically set up a view to create a page at this URL? And why does www.productworld.com/blog-posts/2012/06/14/hello-world-3 show up as a valid page, when it contains "blog-posts" in it's URL?
Any help would be greatly appreciated. If I should display stuff to do with my stylesheet please let me know.
To me it looks as if you have panels overriding the Node template. Which is why your node is not being displayed properly.
Go to Structure > Panels and see if the Node Template option under Manage pages is enabled. If it is, that's probably your issue. You can tell if it's enabled by looking to the right of the text to see whether it says enable or edit.
You can then edit that setting and then edit the content and choose Node > Body to get the body of the blog post to show correctly.
Take a look at this intro video to panels if you aren't familiar with it. http://yadadrop.com/drupal-video/panels-3-overview
Take the leading '/' character out of your page path for the view - internal Drupal paths should generally never have that, but the system will prepend the configured base path to paths on your behalf (and it is probably already a '/').
I use facebook share button for every post in my blog.
(http://loveclubhouse.blogspot.com/)
When there was no Open Graph meta tag included in my blog, facebook would retrieve the first picture from the post's page to make a preview story on the sharer's wall for this post.
Once, I added an Open Graph image meta tag to my blog:
<meta expr:content='data:blog.postImageThumbnailUrl' property='og:image'/>
However, the size of postImageThumbnails turned out to be too small, so I decided not to use them anymore and removed the above metnioned Open Graph meta tag from my blog.
The problem is:
Even though I removed all Open Graph meta tags from my blog, facebook still somehow creates preview stories for my posts based on those tiny data:blog.postImageThumbnailUrl and doesn't want anymore to retrieve the first pictures from posts content as it was before I made any changes in my blog.
Try facebook debugger tool, it deletes the cache as well.
I am maintaining a wordpress blog and am familiar with using the og:image meta tag to set the default image that is included when a like button is pressed. What I want to know is if there is a way to make this image dynamic based on the item liked.
I am trying to build it so that the first image in a particular blog post that is liked is what is pushed to the facebook feed post, with the blog's default image only used if there is no image in the post. Does facebook provide any way to do this with the graph api?
I tried writing javascript to change the meta tag on article pages (rather than the homepage) but found out later the crawler does not run javascript, so am now considering implementing the same but server side with PHP. This still would not solve the problem of Likes from the blog homepage, where there are multiple blog items on the page though. Any advice would be greatly appreciated.
Thanks
The only is changing how the meta tags get rendered to the client, in server code or in your layout template. There is no graph api method for this and you can't modify the tags with javascript as their scraper doesn't execute javascript.
Also, the scraper won't keep re-visiting your site so once it access it, it will be cached until you go to the url linter tool manually. so for the home page, you would probably just want the default image.