ajkohn2001
Forum Replies Created
-
Forum: Plugins
In reply to: Using the_excerpt for meta descriptionNo, the theme only has one function related to the sidebar.
It’s okay, this will do for now, particularly since it’s only the backup meta description if I haven’t crafted one already … which I always do.
Thanks again!
Forum: Plugins
In reply to: Using the_excerpt for meta descriptionThanks so much alchymyth! This makes sense.
The excerpt seems to stop at the first link in the text instead of grabbing all 55 words. Is there another function for that?
Again, thank you for your code savvy and quick reply.
Forum: Plugins
In reply to: Using the_excerpt for meta descriptionHey, that seems to work for the most part. Here’s a sample:
<meta itemprop=”description” content=”I’m a bit of a minimalist when it comes to my wallet, never wanting to come close to having the dreaded” />
Just have to get the encoding right. That’s not showing up here though. It also seems to be tripping over links and images but I think there’s a way to strip those out.
So, if it’s a single post you’re … creating the postdata for that post, then echoing the get_the_excerpt and escaping HTML attributes in the process. Do I have that right?
I’m thrilled it works but I’d also like to learn exactly why it works too 😉
Forum: Plugins
In reply to: Using the_excerpt for meta descriptionI very much appreciate the reply!
I’ve read the_excerpt and I have a feeling you can’t call it from the head but instead have to use it in conjunction with a function but I’ve tried a number of methods and they all seem to fail.
I tried your version and it returns an empty field:
<meta itemprop=”description” content=”” />
I tried this but couldn’t get it to work.