Pulling blog data on any page in Bigcommerce - bigcommerce

So I know how to show recent blogs using
---
blog:
recent_posts:
limit: {{theme_settings.homepage_blog_posts_count}}
---
{{#each blog.recent_posts}}
{{url}}
{{getImage thumbnail 'gallery_size'}}
{{thumbnail.alt}}
{{title}}
{{summary}}
{{/each}}
But is there any other blog data I can pull, and have it on any page??
Can I specify {{thumbnail.alt}} and if so where?
Can I change the number of characters pulled in {{summary}}
Ideally can I pull blog tags somehow on the home page?
I need something, anything I can hide a list of urls in so I can write some javascript to categorize this blog and have certain blog articles appear on certain pages...

There's loads more data available. Check out the stencil documentation and
https://developer.bigcommerce.com/stencil-docs/reference-docs/other-objects-and-properties-overview#other-objects_blog
It looks like you already have the thumbnail alt in there, but here's some more:
limit summary
{{ellipsis summary 75}}
blog tags
{{#each tags}}
<li class="tag">
#{{name}}
</li>
{{/each}}
I think you might be needing to check out 'filter' under handlebar help reference to return just certain blogs / categories though.
https://developer.bigcommerce.com/stencil-docs/reference-docs/handlebars-helpers-reference

There is currently no way to set the image alt tag. It will simply return the title of the post. I will ask the BigCommerce team to look into potentially setting up a way to specify the alt text.
If you need additional control over the blog data, your best bet would be to make AJAX calls to the frontend API to get the data, then manipulate it using JavaScript. You can check out this article I wrote on displaying only posts that are tagged with "featured": https://medium.com/bigcommerce-developer-blog/how-to-feature-a-blog-post-in-bigcommerce-f67d15d36597
The main power comes from this function:
api.getPage('/blog/', options, (error, response) => {})

Related

Add featured blog area to Shopify article template

I'm using shopify which allows a dynamic section on the home page to show 3 blog posts however this only appears on the homepage.
I would like to add the featured blog section that’s used on my Shopify home page, in the bottom of the Blog article template
I have added the {% section ‘featured-blog’ %} to the article.liquid template below {% section ‘article-template’ %} and it displays the 3 blog items but with dummy text and images, it can’t seem to get my actual blog posts? I must be missing something to get the actual blog content but I cant seem to figure it out!
Any ideas or help would be very very appreciated!
Output gets dummy text instead of my blog posts
All is good in your world! You need to navigate to an Article that is assigned to that template within your theme settings panel. Configuration settings for the Index (home page) and that Article template are distinct. It is awaiting your input and currently showing the default fallbacks.

How to Add Meta Tags For Each Post Separately in Blogger?

I have just Started With Blogging and Created My New Blog I'M FROSTY with Blogger. As I'm asking my question here, I already know, We need to Add Following Code to "Custom HTML Template Editor" in Header Part to add "Meta Tags" for each post for SEO.
<!--
<b:if cond='data:blog.url == "PAGE-URL"'>
<meta content='PAGE-DESCRIPTION' name='description'/>
<meta content='PAGE-KEYWORDS' name='keywords'/></b:if>
-->
I have also Googled for solution but there are replicas of this same answer. But this is practically impossible to add this code for each post if we have 1000's of posts. That template will becomes heavy and difficult to manage. so Can we do this with any other easier way ? or Can We Add "Add Meta Tags" Widget to Post Editor that work similarly like "Add Search Description" or "Add Lables" widgets in right column of post editor ?
- Thank You.
It's not possible to do. You can only set the meta description from the post editor. But to set the keyword, it will be a bit tricky. You can use the post title as keyword with some repetition.
By the way, using <b:if cond='data:blog.url == "PAGE-URL"'> conditional tag is not a wise action. You will spend about 1 month to manually set the description and keyword for 1000 posts.
Simply use a bit code, set the description from post editor, and then use title repetition as keyword.
This functionality is not there as of date.
Go to the official blogger product forums and post your suggestion in the suggestions forum.
https://productforums.google.com/forum/#!categories/blogger/feature-suggestions--feedback
They do go through our suggestion and respond/implement our suggestions sooner or later.

Does Google support Article Rich Snippets?

I have been looking at rich snippets in google. Google lists the following schema.org items as being supported:
Reviews
People
List item
Products
Businesses and organizations
Recipes
Events Music
I have noticed that in search results, Google displays Rich Snippets for Article and BlogPosting. When clicking on the link and using Firebug to check the source code, I can see that the schema.org being used is indeed BlogPosting.
I've tried adding BlogPosting to my sample code and using Google's Rich Snippet tool to check the results but I cant get an image to display. I am using the following code:
<html>
<body> etc etc....
<div itemscope="" itemtype="http://schema.org/BlogPosting">
<img itemprop="image" href="/images/test.jpg" item>
</div>
...
Although it doesn't show the image in the Rich Snippet tool, it does recognize that an image has been set and displays the url text in the "Extracted rich snippet data from the page" box. I have tried using the SoftwareApplication schema and then I get an image to show.
My question is: Does the Rich Snippet tool restrict the images it shows based on the schemas listed above, and actually once in the live search results, Rich Snippets for Article and BlogPostings will be shown?
Google has introduced Rich Snippet for Articles, so you can now use articles snippet for your article/blog post.
See this official document from Google on implementing rich snippet for your articles: https://developers.google.com/structured-data/rich-snippets/articles
And as far as your image issue is concerned, try to apply the snippet code as per the document above and it should show the image. I tested it and all worked fine.
As of now, Google is not going to display product images in SERPS for schema.org/Article or schema.org/BlogPosting item types. It's going to show the Author profile image that it pulls from Google+ using one of two methods:
https://plus.google.com/authorship
... think about it. Everyone would be trying to attach add some (spammy) image next to their blog post in SERPS. Google only wants to show verified authorship by their authentification methods (via G+) -- not just from any "author" tag in microdata.
Yes, the rich snippet tool will not show you what the actual SERP will always look like, because it depends on the query. In fact they say
Note that there is no guarantee that a Rich Snippet will be shown for
this page on actual search results.

SEO - META Tags and Google

I just found out that Google recently decided to start using their own "title" when they display their search results. Also, after checking Yahoo and Bing I saw that the way they are displaying their results are the same but in completely different way than Google.
I guess my question would be, if there is an actual "correct" way of adding titles to my pages in order for Google to display what I want them to and this way get the same results with Yahoo/Bing that are currently using the page's title as a search result (sometimes they pick up the first tag and use it as title).
Any recommendations or links to follow for more studying would be appreciated.
There's nothing you can really do about it. Google will choose what title to display based on criteria they have not made public. This usually is the page's title as found in the <title> tag but if Google feels a different title better summarizes the page's content they may choose to display something else.
You can try to change your page titles to better reflect the page's content and see if that helps.
Using optimal keyword prominency in meta tags according to guidelines... and Google will pick up your meta tags. See our news portal's source and metas (keywords: hírek, választás 2014, etc.): http://valasztas2014.hir24.hu/

SEO: Can dynamically generated links be crawled?

I have a page containing <div> tags with onclick="" code that calls an ajax request to get json data, and then iterates through the results to form links (<a />) to append to the page. These links do not exist in any other place on my website. How can I make these dynamically generated links crawlable?
My initial thought was to turn the <div> tags into <a> tags with a href="#", but with my limited knowledge of how typical crawlers work, i don't think this would solve my problem since the "#" would be what's recognized by the crawler, and not necessarily the dynamically generated output. This is besides the point that i don't want the scroll positioning to be altered at all, which would also rule out giving the <a> tag an id and having it reference itself.
Do I have any options aside from making a new page containing all of the links i need to be crawled? Thanks.
As a general rule, content that is created or made available through JavaScript cannot be found or indexed by search engines. Google does support crawlable Ajax but using it as the only means of accessing your content is bad for accessibility. Also, other search engines can't get to that content which is also not a good thing. Basically crawable ajax is a bad thing.
You should always make your content available without requiring JavaScript to get it. Then you can improve your site by adding JavaScript to make getting the content faster or easier. This is called Progressive Enhancement and is how good websites are built.