Closed Thiousi closed 7 years ago
This is a start for the seo.php
file, but not sure where the content comes from so far... The core seems to do it, I'll have to dig through.
$html['og:title'] = ( ! empty( $content ) ) ? '<meta name="og:title" content="' . $content . '">' . "\n" : '';
$html['og:description'] = ( ! empty( $content ) ) ? '<meta name="description" content="' . $content . '">' . "\n" : '';
$html['itemprop:name'] = ( ! empty( $content ) ) ? '<meta itemprop="name" content="' . $content . '">' . "\n" : '';
$html['itemprop:description'] = ( ! empty( $content ) ) ? '<meta itemprop="description" content="' . $content . '">' . "\n" : '';
I'm not really fond of being bound to a special social media site like Facebook or Twitter. But on the other hand, they are really big.
What I'm also afraid of is that this plugin will turn into bloatware if I keep adding stuff that some people maybe uses,
Right now I think that this feature idea is great, but maybe not for this plugin. Maybe it would be better to separate them?
What I could think of as a good idea would be helper functions, like print the og title in the meta from the seo title.
I saw you wrote something... need to see what it is...
Alright, do you mean using existing data or add more stuff in the panel?
I mean to use the same existing data you have already. Basically, a helper function would be great like you say. I really like your field in the panel as a way to define the values, but it's forcing me to echo with the html tags. I'd like the option to echo the raw value so I can use it in different tags!
I agree that helper functions would be great!
Maybe this works in the meantime? It's possible str_replace the string to remove <title>
. Ugly as hell, but should work.
<?php echo seo('title', array(), true); ?>
<?php echo seo('description', array(), true); ?>
It should not wrap any html with the true value.
It's been a while so I don't remember all I did with this field. A little rusty.
I see, I missed that in the doc.
I think this issue can be closed?...
And possibly Twitter cards tags?