Jump to content

How to show only one category or tag in seo text/description if have many category or tag?


viper

Recommended Posts

How to show only one category or tag in the SEO text/description if have many categories or tags?

 

like 

Sample SEO text for showing on %categories_as_string% category page. Here you can use <strong>HTML tags</strong>. Here you can show random %tags_as_string% words.

showing all categorie and tags

Link to comment
Share on other sites

8 hours ago, Tech Support said:

Not possible via language tokens like %categories_as_string%, which text is that?

In video SEO, i want to show only one category that randomly chosen.

In one video, there are three or four categories, so i want to select only one automatically.

Link to comment
Share on other sites

It could be possible to show random category there, but not recommended, because it will be random every time and Google doesn't like that.

You can show the first one in Website UI -> Pages -> View video page template. Find this line:

{{assign var="page_description" value=$lang.html.video_details_description|replace_tokens:$storage.video_view_video_view}}

Replace with this:

{{assign var="page_description" value=$lang.html.video_details_description|replace_tokens:$storage.video_view_video_view|replace:"%first_category%":$storage.video_view_video_view.categories[0].title}}

Then you can use %first_category% instead of %categories_as_string%

  • Thanks 1
Link to comment
Share on other sites

9 minutes ago, Tech Support said:

It could be possible to show random category there, but not recommended, because it will be random every time and Google doesn't like that.

You can show the first one in Website UI -> Pages -> View video page template. Find this line:

{{assign var="page_description" value=$lang.html.video_details_description|replace_tokens:$storage.video_view_video_view}}

Replace with this:

{{assign var="page_description" value=$lang.html.video_details_description|replace_tokens:$storage.video_view_video_view|replace:"%first_category%":$storage.video_view_video_view.categories[0].title}}

Then you can use %first_category% instead of %categories_as_string%

and give code for tag also

Link to comment
Share on other sites

2 minutes ago, Tech Support said:
{{assign var="page_description" value=$lang.html.video_details_description|replace_tokens:$storage.video_view_video_view|replace:"%first_category%":$storage.video_view_video_view.categories[0].title|replace:"%first_tag%":$storage.video_view_video_view.tags[0].title}}

 

Thanks 😍

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...