Wordpress
Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’)
Here is the relevant portion of my page template code: $yoast_meta = get_post_meta($post->ID, '_yoast_wpseo_metadesc', true); function my_service_template_footer_data() { echo "<script type='application/ld+json'> { '@context': 'https://schema.org/', '@type': 'Service', 'serviceType': ' " . get_the_title() . " ', 'description': ' " . $yoast_meta; . " ', 'provider': { '@type': 'LocalBusiness', 'name': '…', 'address': { '@type': 'PostalAddress', 'addressLocality': '…', 'addressRegion': … Read more
Display a single category in blog section
I have been struggling with a problem, I have a webpage running on WordPress, most of the things work as expected, except one: in the blog section page (the one that is configured in settings/reading -> Posts page), all posts are shown. I have a specific category that should be presented there, but I don’t know how to alter the loop to work as expected. Here´s the code of the index page:
Changing search slug from + to – (hyphen)
I’ve been fiddling with this all day, where I’m trying to change my search function from website.com/s?this%20is%20an%20example to website.com/tag/this-is-an-example to no avail.
Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
So here’s an odd one. I have custom taxonomies that show on the admin menu of both post types they’re associated with, but only one of the post types shows them in its edit menu. (Over on the side of the post edit screen, where it says Categories, Tags, Featured Image.)
What is cookie “U” from domain “.adsymptotic.com” found on the WordPress page?
On a landing page of our WordPress site, I find a cookie “U” from domain “.adsymptotic.com” as the image below shows. Could you please let me know where this comes from because searching the project folder doesn’t show results for this cookie? Answers: Thank you for visiting the Q&A section on Magenaut. Please note that … Read more
Loop through posts of only 2 statuses
Setting up a visibility condition for a widget – i need it to apply to the posts in a certain term but only those of “pending” and “publish” status. this essentially hides the “add new post” button if they already have a post in that term that is pending or published. i just cant define the 2 statuses properly. i can define just 1 and it works perfect.
How to combine two get_users() array?
The $q1 and $q2 are working well individually.
Access category within rss2_head hook?
Can I access the current category of a category feed with the rss2_head hook to add for example itunes tags?
Get terms of a post but only if they’re also the child of a specific term
I have the below code successfully running on my custom post type archive pages. The only issue I have is that I want the list of ‘book_cat’ taxonomy terms for that post but ONLY if they’re also children of the taxononmy term with an id of 5.