SEO: Similar Title & H1 wording across most pages on a site - seo

On a site that sells electronics, suppose the Title and H1 tag of every category page contained the words "Shop for" followed by the category.
IE the page that pertained to laptops would have in its tags:
<title> Shop for Laptops </title>
<h1> Shop for Laptops <h1>
...and the page that pertained to cameras would have in its tags:
<title> Shop for Cameras </title>
<h1> Shop for Cameras <h1>
// etc..
Would the fact that "Shop for" was in the title and H1 tag of every category page hinder SEO? Would it be better if there was some variance to the words "Shop for" across the site?

The right format for title is "The most important keyword | 2nd important keyword | 3rd important keyword". For example, if we want to sell a camera, we can set the title for the page - "Canon EOS 5D Mark III - SLR Camera - Your Website Name". "Canon EOS 5D Mark III" is the product name, "SLR Camera" is the category name, and the 3rd important keyword is your website name. In addition, we use symbols "-" or "|" to divide the keywords. Last, remove the words that users do not search from search engines, eg, "search for".

Yea I am agree with #Cythilya
That is good and title should be like this
"The most important keyword | 2nd important keyword | 3rd important keyword"

Related

Beautiful Soup and Requests - add missing </td></tr> to one line of HTML code

I am currently Python coding using Beautiful Soup. The website i am trying to extract data from is http://xml.coverpages.org/country3166.html
On the whole I can get everything working that I want. I am extracting country code and country from the HTML using the <tr> tag. This is for a project I am setting myself.
The problem is that the source HTML is missing some closing tags on one of the countries (Moldova). See below. This means when I loop through my code it stops doing what I need at Moldova.
<tr valign=top><td>MA</td><td>Morocco</td></tr>
<tr valign=top><td>MC</td><td>Monaco</td></tr>
<tr valign=top><td>MD</td><td>Moldova, Republic of
<tr valign=top><td>MG</td><td>Madagascar</td></tr>
Thanks
I know I could just create a new text file and manually amend it but is there anything I can do Beautiful Soup wise to fix this? My plan was to iterate through each line until Moldova is found and then append </td></tr> on the end. Is there a more efficient way?
If I inspect the source you've linked the HTML seems fine, there's probably a mistake in your way of scraping the data.
A small example were we search for each tr, get it's children (2x td), and parse those as code and country to show a list:
import urllib3
from bs4 import BeautifulSoup
http = urllib3.PoolManager()
response = http.request('GET', 'http://xml.coverpages.org/country3166.html')
soup = BeautifulSoup(response.data, 'html.parser')
for tr in soup.findAll("tr"):
childs = tr.findChildren();
code = childs[0].getText();
country = childs[1].getText();
print(code, country)
Will output:
AD Andorra
AE United Arab Emirates
AF Afghanistan
AG Antigua & Barbuda
AI Anguilla
AL Albania
AM Armenia
AN Netherlands Antilles
AO Angola
AQ Antarctica
AR Argentina
AS American Samoa
... and many more, including Moldova and beyond

Customizing a BigCommerce product listing

This is a section of code for listing the name of a product in list-item.html:
<h4 class="listItem-title">
{{name}}
</h4>
Below the name, I would like to add "Date Added: " and the date it was added to the website, but only if the item is in the "What's New" category. I can't figure out the syntax for saying "If this product is in the What's New category, then display "Date Added: " and date it was added.
Does anyone have a clue where I would start to do this? I am still very new to BigCommerce.
You can use {{date_added}} to display the date that the product was added, but adding logic to display it in a specific category is a little more complex.
In list-item.html, {{category}} is scoped to the individual product being rendered, so doing something like the example below will only work if the item appears only in the What's New Category.
{{#if category '===' 'What's New'}}
{{date_added}}
{{/if}}
Another option would be to create a custom template for the category page. That would give you the control to create a custom list-item.html component that references {{date_added}} just on a certain category page. This video is a good starting point for creating custom templates, and you can find documentation here.

regexp_replace limit the number of characters displayed before / after each occurrence

I created a simple word search in a web application that goes through all documents stored in our Oracle 12c database and displays links to those documents that contain the specific word. In addition it orders the list of documents based on the number of occurrences in each document.
The documents are simple html formatted texts stored in NCLOB datatype column, first few lines:
<div class="content3">
<div class="content_bg">
<div class="mainbar3">
<div class="article">
<h2>Welcome to Web<br>
</h2>
<p>This web is categorized into several sub-webs which are accessible from the main page:</p>
<p><strong>Teams</strong></p>
<p>This sub web is accessible for everyone in o
The "web document" is displayed in the browser upon clicking the particular link in the search output.
In the search output (list of links to the documents) I would like to include excerpt of each document with the search word highlighted. Note that each document can contain any number greater than 1 of occurrences of the word and the search is supposed to be case insensitive. The search output contains only links to documents where the word occurs at least once.
Here is where I have got so far:
select 'Documents',
'open_document.aspx?id=' || doc_id,
regexp_replace(regexp_replace(web_code, '<(.|\n)*?>', ''), '(word)', '<b><span style="background-color: #ffff00;">\1</span></b>\2', 1, 0, 'i') web_code,
doc_name,
regexp_count(regexp_replace(web_code, '<(.|\n)*?>', ''), 'word', 1, 'i') occurences
from web_knowledge_base
where lower(web_code) like '%word%';
This displays the links to documents which contain the search word, number of occurrences that is later used to order the list of links, and it also displays the html documents with the search word highlighted (that is the regexp_replace with style part).
Any way to limit what is displayed in the html document (the regexp_replace part)
a) To display only the sentences that contain the search word for each occurrence
b) To display 10 characters before and after each occurrence of the search word
while still having the search word highlighted and search case insensitive?
I'd like to do this as part of the select statement if possible.
Thanks a lot!

Where i wants to give the actual keyword in my website for SEO?

I have 10 keywords for my website. Please tell Where i wants to give the actual keyword in my website (home page or any place?)for display google search?
For put keywords in Home Page or any other Page:
Login to Admin panel.
go to CMS->Pages than select any page.
Here in Mete Data tab you can insert your Meta Keywords and Meta Description.
For put keyword in Category page:
go to Catalog->Manage Categories than select any category.
Here you can insert your Meta Keywords and Meta Description.
For put keyword in Product Detail page:
goto Catalog->Manage Products than select any product.
Here in Meta Information tab insert your Meta Title,Meta Keywords and Meta Description.
(If not display Meta Information tab or meta attributes than goto Catalog->Attributes->Manage Attributes Set to manage meta attribues for product accoring to product type.)
u should put those in meta tag
<meta name="description" content="Awesome Description Here">
of your page
you should add these meta tags in header of all pages.
<meta name="title" content="TITLE of Page">
<meta name="description" content="Description of Page">
<meta name="keywords" content="title,tag,tag2">
avoid repeating the keywords

WebMatrix Nested WebGrid VB code

I have looked at the code in both the following posts:
formatting in razor nested webgrid, replied to by nemesv in October 2011 and
Razor Nested WebGrid, replied to by Chad Moran in April 2011.
They both seem to be close to my problem but the code is C# based, I believe, and I am having difficulty converting it to VB. I am also not sure they are exactly where I am at. I am particularly bemused by the following line, because of the two equals signs and double reference to subGrid.
WebGrid subGrid = subGrid = new WebGrid(item.SubItems)
I am also not sure whether topGrid and subGrid are just generic names, used for the purpose of illustration, or whether they are key words.
As a very relevant aside I will mention that this point in my web page project has held me up for five years now (I am not exaggerating - I just stopped working on the project for two years because of it). I have tried using ASP in VWD and now Grid View in WebMatrix and I hope I will not fail again.
Database record
Fields: Publisher_Name, Publisher_City, Series_Published, No_of_Series
Record Example: Price Stern Sloan, Baltimore, JKLMNO, 6
My two planned grid names
Publishers_Grid (top)
Series_Grid (sub)
What I am trying to do
For each of the characters in the string JKLMNO, access a second table, where each letter is the primary key for a record in that table.
Retrieve the value of the field, Back_Cover_Image, in that second table, which will be the file name or, at least, the unique part of the file name, for the image to be displayed.
If I go with the partial unique bit of file name approach, build the full file names for the images. And then -
Display as a second web grid row, the images thus pointed at, in the record example, that would be 6 images.
Thus I would end up, for the example record, something like the following (I have used XX to stand for an image): -
Price Stern Sloan Baltimore XX XX XX XX XX XX
I certainly I hope I am not wasting the valuable time of experts who I greatly admire. I'm just trying to achieve something that seems quite simple to me, having originally been a PL/1 programmer, 30 years ago, and a great user of nested arrays within that language, but I just can't work out the syntax in VB, Razor and WebMatrix.
I look forward to some constructive answers, and please do use VB.
My WebMatrix page so far
#Code
Layout = "~/Shared/Layouts/_Layout.vbhtml"
Dim HWB_Database As Database = Database.Open("How_and_Why_Wonder_Books")
Dim HWB_Publishers_All_sqlCommand = "SELECT * FROM Publishers ORDER BY Publisher_Code"
Dim Publishers_Data = HWB_Database.Query(HWB_Publishers_All_sqlCommand)
Dim Publishers_Grid = New WebGrid(Publishers_Data)
End Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>How and Why Wonder Books - Publishers</title>
</head>
<body>
<div style="margin-left: 100px">
<p style="Width: 1020px; border-width: 1px" class="InstructionsHeader">
Click on a publisher to see the list of titles produced under that imprint, click on a thumbnail to see details of that series type.
</p>
</div>
<br>
<br>
<div id="Publishers_Grid_Display">
#Publishers_Grid.GetHtml(columns:= Publishers_Grid.Columns(
Publishers_Grid.Column("Publisher_Name"),
Publishers_Grid.Column("Place_of_Publication"),
Publishers_Grid.Column("Series_Published")
)
)
</div>
Thank you for your promptings and encouragement.