Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2021-02-16 03:52:23
- marios2
- Member
- From: Germany
- Registered: 2019-07-31
- Posts: 76
<txp:meta_description />
<txp:meta_description /> does not output anything in any context page.
I am using TXP 4.8.2
rgrds marios
Offline
Re: <txp:meta_description />
Can you clarify this a little ? What kind of code are using etc.
Per the docs, by default the outputted element would be basically invisible (as would any <meta name="" content="{your description}" />
).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: <txp:meta_description />
Yes, where are you intending this to be displayed? If you use it without any arguments it will display a meta tag designed for use in the <head>
of your page. If you want to display the content elsewhere, you need to use the format=""
attribute.
Finally, the type of description is context sensitive and it tries to be smart about which description it pulls based on where the tag is used (section, category list, article, etc). If you want to display a specific description you can override the context with the type
attribute.
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
#4 2021-02-17 13:45:12
- marios2
- Member
- From: Germany
- Registered: 2019-07-31
- Posts: 76
Re: <txp:meta_description />
Well, I’m thinking this to be a bug. I am using it without any arguments in the header section in a page template without any conditionals around.
It did not display any errors in debugging mode either.
rgrds, marios
Offline
Re: <txp:meta_description />
Hmmm, it works for me. Steps to success:
- In your page template inside the
<head>
, add<txp:meta_description />
. Ensure it’s being edited in the correct Theme: either your in-use public theme if you intend to view the site from a non-logged-in account, or in your current development theme if you’re testing. - Visit Presentation>Sections.
- Click the section you want to set the description for.
- Type in your description (max 255 chars) and save the Section.
- Open an article that’s in that same section.
- In the Meta area, enter a description for the article and Save it.
- View your front-end section landing page for that section and look at the source code. See the
<meta>
tag with the content from the Section is there in the<head>
. - Navigate to the individual article in that section and view source. See the
<meta>
tag with the content from the article is there in the<head>
.
That’s the context sensitivity at play. If your experience differs to the above, I’d like to know about it because then it’s a bug.
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
#6 2021-02-17 16:10:11
- marios2
- Member
- From: Germany
- Registered: 2019-07-31
- Posts: 76
Re: <txp:meta_description />
Oh, my bad. I seem to have missed the meta description fields in the backend on articles and sections. No bug,…all is good.
rgrds, marios
Offline
Pages: 1