Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2023-02-22 08:15:23
- astick360
- Member
- Registered: 2022-05-05
- Posts: 23
How to solve SEO for sections and articles
Hello. I am making a page where the menu is section based only. There will be 2 dynamic sections in it: news and blog.
I want Sticky status articles use only to fill descriptive pages with content, so I excluded them from the sitemap. They are to be indexed by sections.
Dynamic content (news, blog) is to be indexed as articles (their status is Live). Articles with Live status are visible in the sitemap.
This is how I arranged it in terms of the sitemap.
Now I have questions about tags for search engines. Due to this scheme, I have some doubts.
1) Will the links of Sticky status articles (constituting the content of the section for descriptive pages) not create duplicate content for seo? Is it possible to somehow make search engines skip them (not see them) for Sticky status, and only index sections that contain them?
2) How to set txp tags for section based descriptive pages to insert Section Description as meta description. For pages: list of articles (blog, news) also insert section description as meta description. However, for an individual article with the Live status (from the section: blog, news) insert a description of the articles as a meta description.
3) Is the above diagram ok for me it is logical, which does not mean that it is right?
Last edited by astick360 (2023-02-22 08:16:01)
Offline
Re: How to solve SEO for sections and articles
Hello.
1) There are few standard solutions (canonical, redirect, etc), but you could also use a ‘hidden’ (pageless) section instead of sticky status. Such sections and their articles have no public URL and are accessible only when explicitly required. So, you could create some ‘secdesc’ custom field for hidden articles and call
<txp:article_custom section="hidden" secdesc='<txp:section />' />
as sticky
articles on section landing pages. Since you have only two sections, this is not difficult to maintain. You could even call (two) hidden articles just via their id
, avoiding the need for a cf.
Another possibility, if your sticky articles don’t really require titles and other stuff, is using Forms instead. You’d need to fill the content in HTML though, or textile it dynamically:
<txp:output_form name="blog_desc" escape="textile" />
2) IIRC, there is <txp:meta_description />
tag working exactly as you need, just try.
3) I leave it with SEO gurus.
Offline
#3 2023-02-23 14:57:16
- astick360
- Member
- Registered: 2022-05-05
- Posts: 23
Re: How to solve SEO for sections and articles
1) This seems like a good solution, but how to use the option: “So, you could create some ‘secdesc’ custom field for hidden articles and call.”
As for the tag: “<txp:article_custom section=“hidden” secdesc=’<txp:section />’ />” it gets it.
Only on these 2 pages (blog, news) there would be an article with the status: Live, because they will be there, and not for Sticky.
In that case, what solution should I choose for static sections and Sticky articles contained in them, because I don’t want to hide the sections, I just want the Sticky articles not to duplicate the content, which will work best and be easy to use? Is there any way to disable addresses for Sticky articles only?
If anyone has any idea, please send me a link to the instructions, because I’m a beginner.
2) So the meta description for article and section have the same tag?
If so, what determines which description is selected if both are filled?
Offline
Re: How to solve SEO for sections and articles
astick360 wrote #334726:
So the meta description for article and section have the same tag?
Yes.
what determines which description is selected if both are filled?
Most Textpattern tags are context (i.e. URL) sensitive. If you’re on a section landing page it’ll (by default) output the section description. If you click through to an article, it’ll output the description for the article.
A tag’s attributes can be used to override this behaviour if you want to do anything particular (and you can use the conditional tag to help detect situations and take different action) but most tags are set up so they do the logical or most convenient thing when used without any additional attributes.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: How to solve SEO for sections and articles
astick360 wrote #334726:
Is there any way to disable addresses for Sticky articles only?
Not that I know of, but you can create an auxiliary pageless section that will serve as other sections ‘sticky’ articles storage. The steps are
- Create a section (named, say,
sticky
) and set its Page to None. This section and its articles will have no public URL. - Post two articles in
sticky
section, one for each ofblog/news
sections. They will serve as descriptive pages for these sections. Retain their IDs (say, 11 and 12) to avoid messing with cf. - On
blog/news
landing page, instead of outputting your current Sticky articles, put (eventually wrapping it in other conditional tags) something like
<txp:if_section name="blog">
<txp:article_custom id="11" />
</txp:if_section>
<txp:if_section name="news">
<txp:article_custom id="12" />
</txp:if_section>
Now you should see these ‘sticky’ articles on sections landing pages, but they are not discoverable individually. To check, go to index.php?id=11
, you should get a 404.
Hope that helps, don’t hesitate to yield otherwise.
Offline
#6 2023-02-24 05:18:33
- astick360
- Member
- Registered: 2022-05-05
- Posts: 23
Re: How to solve SEO for sections and articles
Thank you for any help.
Well context <txp:meta_description /> I could have guessed, thanks for the hint: Bloke.
I don’t know if I expressed myself correctly (section and article sticky) because my English is bad.
I have a lot of static sections with sticky articles. Therefore, the auxiliary section without pages is eliminated. But it’s good to know that there is such an option, thank you etc.
I only have two dynamic pages (blog, news) and here, basically, from what you have already helped me, I can handle it.
I’m wondering (of course, my knowledge is beyond my knowledge), is it possible to insert a condition somewhere that when a link to a sticky article is called, it will redirect to its section?
From what I’ve read, it shouldn’t affect SEO (I could be wrong of course) and do away with duplicate links. Can this be done or not?
Or other ideas are very welcome.
This is my return to TxP after a first failed short try with it. I’m sorry I gave up so quickly the first time.
I find after many tests with other cms that TxP is extremely flexible. Contrary to my first hasty assessment. And I would rather stay with him for longer. All the cms I tested, and there were too many of them, are just stiff and slow with TxP. There are other cms with their similar tags but the simplicity and flexibility of the TxP tag breaks them. I don’t know PHP, and I learned the basic uses of the TxP tag very quickly.
Thank you to the creator for this unique tool.
Offline
Re: How to solve SEO for sections and articles
astick360 wrote #334742:
I’m wondering (of course, my knowledge is beyond my knowledge), is it possible to insert a condition somewhere that when a link to a sticky article is called, it will redirect to its section?
From what I’ve read, it shouldn’t affect SEO (I could be wrong of course) and do away with duplicate links. Can this be done or not?
I don’t know how it is SEO-wise, but the redirection is easy:
<txp:if_individual_article>
<txp:if_custom_field name="status" value="5">
<txp:header name="Location" value='<txp:section url />' />
</txp:if_custom_field>
</txp:if_individual_article>
Where (Page, Form) you put it depends on your templates structure.
This is my return to TxP after a first failed short try with it. I’m sorry I gave up so quickly the first time.
I find after many tests with other cms that TxP is extremely flexible. Contrary to my first hasty assessment. And I would rather stay with him for longer. All the cms I tested, and there were too many of them, are just stiff and slow with TxP. There are other cms with their similar tags but the simplicity and flexibility of the TxP tag breaks them. I don’t know PHP, and I learned the basic uses of the TxP tag very quickly.Thank you to the creator for this unique tool.
Pity we have no ‘testimonials’ page, thank you :-)
Offline
Re: How to solve SEO for sections and articles
<txp:if_custom_field name="status" value="5">
Perfect. An another programming easter egg!
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline