Allowing Yoast SEO plugin to track me

For reference the file that handles the tracking and usage statistics for Yoast SEO is located at, path/to/wp-content/plugins/wordpress-seo/admin/class-tracking.php I have linked to the GitHub repository file in question for further inspection upon which you can see somewhat, relatively, harmless collection of data. However what you determine as “harmless” is case dependent because the opposite could … Read more

Advanced Custom Fields and Yoast SEO keyword analysis [closed]

Looking at the filter: $post_content = apply_filters( ‘wpseo_pre_analysis_post_content’, $post->post_content, $post ); it would be a matter of adding your fields content to string being analyzed. You have to do the get_field() part right, this is untested: add_filter( ‘wpseo_pre_analysis_post_content’, ‘filter_yoasts_wpse_119879’, 10, 2 ); function filter_yoasts_wpse_119879( $content, $post ) { $fields = get_field( ‘name’, $post->ID ); return … Read more

How to roll back a WordPress plugin update?

Unless the plugin has made significant database changes, you could follow these steps to downgrade it: Download and extract the old version from the plugin repository Disable the plugin Log on to your server with FTP or SSH Upload the old plugin directory to wp-content/plugins/. (You would want to overwrite the newer version.) Reactivate the … Read more

Remove an action from an external Class

A simple way to achieve this (but without the Class approach) is by filtering the output of wp_head action hook using the output buffering. In your theme’s header.php, wrap the wp_head() call with ob_start($cb) and ob_end_flush(); functions like: ob_start(‘ad_filter_wp_head_output’); wp_head(); ob_end_flush(); Now in theme functions.php file, declare your output callback function (ad_filter_wp_head_output in this case): … Read more

Remove the Yoast SEO Post Metabox [closed]

On remove_meta_box is a note: Because you can’t remove a meta box until it’s been added, it’s important to make sure your call to remove_meta_box() happens in the right sequence. WordPress SEO adds meta boxes on add_meta_boxes action with default priority – 10, which run after admin_init, so that won’t remove them. Instead you need … Read more

WordPress SEO by Yoast: Hide Meta Boxes in Posts for Non-admins

It didn’t say in the API docs on the Yoast SEO plugin site what the ID was and I don’t have a copy of Yoast at installed at disposal, but according to yoas-plugin-dir/admin/class-metabox.php line 144, the meta_box registered is; add_meta_box( ‘wpseo_meta’, …etc ); … Which is hooked onto add_meta_boxes hook on line 32 of the … Read more

How to add a page to the Yoast breadcrumbs

Here’s the general principle of what you need to do: Hook into the wpseo_breadcrumb_links or wp_seo_get_bc_ancestors API filters. Add your Blog into the WordPress SEO Breadcrumb $links array, using array_splice. Place this in your theme’s functions.php: /** * Conditionally Override Yoast SEO Breadcrumb Trail * http://plugins.svn.wordpress.org/wordpress-seo/trunk/frontend/class-breadcrumbs.php * ———————————————————————————– */ add_filter( ‘wpseo_breadcrumb_links’, ‘wpse_100012_override_yoast_breadcrumb_trail’ ); function wpse_100012_override_yoast_breadcrumb_trail( … Read more

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