Display of tags in head section
-
Hi,
Just installed your plugin on a site and works fine.
I notice all tags are in 1 long string in head section. Maybe you can consider adding tags underneath each other, so it looks more user-friendly for people who look in head section?
Guido
-
When you turn on
WP_DEBUG
all tags will be split to separate lines. It is enough? Or should I add \n always?I’m not sure at all ๐
Marcin
- This reply was modified 2 years, 2 months ago by Marcin Pietrzak.
Hi Marcin,
Did not know that.
I prefer underneath each other, but who am I ๐
Several tags are very short, so I can imagine you don’t want a new line for every tag.So only a new line for opening and closing tag?
<!-- OG: 2.9.9 --> <meta property="og:image" content= <!-- /OG -->
Currently closing tag is directly after the last OG tag.
Guido
Thank You @guido07111975!
I added few EOLs – after main groups and I fixed last line too.
When WP_DEBUG is on, there is no changes, one entry per line.
Marcin
Hi Marcin,
Yes, that makes sense and looks better. Thanks!
1 last question, I notice a username is added as well, example:
<meta itemprop="author" content="admin" /> <meta property="profile:username" content="admin" />
At my client site the nickname is “admin”, username is something else. Or am I missing something?
Guido
This is the display name of a user:
get_the_author_meta( 'display_name', $post->post_author ),
If is set first and last name, then:
<meta itemprop="author" content="Foo Bar" /> <!-- profile --> <meta property="profile:first_name" content="Foo" /> <meta property="profile:last_name" content="Bar" /> <meta property="profile:username" content="Foo Bar" />
- This reply was modified 2 years, 2 months ago by Marcin Pietrzak.
- This reply was modified 2 years, 2 months ago by Marcin Pietrzak.
I have 1 user with nickname admin.
After some testing I now notice it does work, except at homepage. It stays admin there whatever I do. FYI: this homepage is a static page, without posts.
Guido
checked:
home page – static – it works well
home page – posts – no autor – it is a list, not singular
single page – it works well
single post – it works wellcould you paste a page url?
M
Hi,
k e r s t o . n l
Don’t want to add full URL here ๐I have installed plugin at another site as well, with the same theme, but in head section there are many more tags present. So I think there’s something not working as expected?
Guido
hmm, it is really odd…
check:
/author/admin/
“Rudy” is correct one?
Could you check “display name” on
/wp-admin/profile.php
M
Thereโs only 1 user:
User = Rudy
Nickname = admin
Display as: RudyHave few active plugins, will de-activate them later to determine whether thereโs a conflict or not.
Guido
Hi,
I have installed a clean WP in a subfolder /blog but again only a few tags, compared to another site I’m missing:
<!-- article --> <!-- twitter --> <!-- schema --> <!-- profile -->
Is this maybe server related?
Guido
But wait, maybe it’s a formatting thing, because it only prints the first (relevant) tag of every group/section:
<!-- OG: 3.0.0 --> <meta property="og:description" .. <meta property="article:published_time" .. <meta property="twitter:partner" .. <meta itemprop="name" .. <meta property="profile:username" .. <!-- /OG -->
Guido
Hi,
Just did, but the same. Please check head section. Both sites are at the same server, the one in subfolder /blog is a clean install. Site Health page returns no issues.
Another site of mine has all tags in head (much more), so at that site all’s good.
Guido
- The topic ‘Display of tags in head section’ is closed to new replies.