Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]

There is indeed an unwanted ; (semicolon) in your function (try to look at line 99 in the twentytwentyone-child/functions.php file) which likely is the cause to the syntax error. So just remove that ; and the error would be gone: function my_service_template_footer_data() { echo “<script type=”application/ld+json”> { ‘@context’: ‘https://schema.org/’, ‘@type’: ‘Service’, ‘serviceType’: ‘ ” . … Read more

How to rewrite title- and meta-description templates for page templates in Yoast Plugin [closed]

You may consider the use of both filter wpseo_metadesc (for meta description) and wpseo_title (for title). The idea is to change the values of title and/or description depending if you meet some condition. So your code will look to somthing like this: add_filter(‘wpseo_metadesc’,’custom_meta’); function custom_meta( $desc ){ if (/* do your test here to check … Read more

How to override the title tag for woocommerce endpoints?

If you added custom WC endpoints on init, you can use something like this instead to check for endpoints (adjust accordingly if you’re using Yoast): function add_custom_endpoints_to_title( $post_title ) { if ( ! is_account_page() ) { return $post_title; } global $wp; if ( isset( $wp->query_vars[‘custom_endpoint_1’] ) ) { $post_title=”Custom Endpoint 1″; } elseif ( isset( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)