Tag Info

Hot answers tagged

12

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 same file, add_action( ...


9

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 ...


5

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 to hook into ...


4

You have introduced 2 additional problems by adding the jQuery from Google CDN. The admin interface needs jQuery called in no conflict mode so it won't interfere with the other scripts WordPress uses for the dashboard. The WordPress dashboard is not yet compatible with jQuery 1.5 thats why it was pulled from trunk right before 3.1 was released. See: ...


4

ASCII characters will not cause any issues with search engines and they will be displayed properly. SEOmoz does this to avoid any chance of sql injection via its form fields.


4

Get Archive SEO titles If you defined a Custom Post Type archive title you can get that by: $titles = get_option( 'wpseo_titles' ); $title = $titles['title-ptarchive-POST_TYPE']; echo apply_filters( 'the_title', $title ); Remember to replace POST_TYPE by your own Custom Post Type. To display all the wpseo_title variables, you can use: printf( ...


4

You can remove it using the remove_meta_box function. if ( ! current_user_can( 'edit_pages' ) ) { add_action( 'add_meta_boxes', 'my_remove_wp_seo_meta_box', 100000 ); } function my_remove_wp_seo_meta_box() { remove_meta_box( 'wpseo_meta', 'post', 'normal' ); } Notice the 100000 in the add_action, this makes sure that this is done after the WP SEO ...


3

I don't think you are going to be able to do that using remove_action. The function argument in remove_action will not help you as the debug_marker() function was not the function that was used in the add_action() call. Yoast presumably has something like add_action( "wp_head", "head" ) in his code. So you can remove the "head" function but debug_marker was ...


3

Throw this into your functions.php: function clear_yoast_metadesc( $metadesc ) { return ''; } add_filter( 'wpseo_metadesc', 'clear_yoast_metadesc', 99, 1 ); If you set the $metadesc to empty like that, it won't be echoed. BTW, bulk editing is very hard on my to-do list, so you would be able to switch back completely :)


3

In the source code I see two og:description meta tags. The first and correct one seems to be coming from your Yoast WordPress SEO Plugin. The other one is outside the plugin's block, so I guess it's defined elsewhere. Check your theme if it includes that meta tag. If not, check your other plugins. Disable them one by one to find the culprit.


3

Yoast uses wp_head hook to output the meta description tag. Make sure you have this line in your <head>: <?php wp_head(); ?> For title tag, you can simplify the code by using one function call: <?php wp_title( '|', true, 'right' ); ?> The wp_title uses a filter (same name wp_title) to let users change the title tag. And Yoast uses ...


3

Try pasting this in a plugin or theme functions.php file, as per the WordPress SEO plugin (API Docs), by Yoast. if(function_exists('wpseo_use_page_analysis') && !current_user_can('administrator')){ add_filter('wpseo_use_page_analysis', '__return_false'); } To avoid any errors... This checks to make sure the function exists, before attempting ...


3

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 plugin ...


3

You will want to make use of Yoast SEO's "WPSEO_Frontend" class. To display the meta description field content, you could do the following: <?php if (class_exists('WPSEO_Frontend')) { echo WPSEO_Frontend::metadesc(false); } ?>


3

Solution: <?php $object = new WPSEO_Frontend(); echo $object->metadesc( false ); ?>


2

In order to be indexed by google news you need a unique permalink structure containing a unique number. You seem to have a permalink structure of %postname% that doesn't contain a number. You could change your permalinks for example to %post_id%/%postname% or %post_id%-%postname% in order to comply with google news requirements.


2

Seriously, I don't know why this thing keeps popping up but: it just works with single quotes, no need to change anything. Need proof? Ok, here we go: Search for "WordPress SEO plugin". Find my site, yoast.com, it'll be #1 in most cases. See the meta description showing? Click on the "Cached" link, then open the source for the cache. There it is, in full ...


2

The WPSEO plugin by Yoast has a filter for the title: 'wpseo_title'. You'll need to add something like this: add_filter('wpseo_title', 'filter_product_wpseo_title'); function filter_product_wpseo_title($title) { if( is_singular( 'product') ) { $title = //your code } return $title; }


2

Edit. Here's another solution to not mess with the edit slug button. The function get_sample_permalink_html in wp_admin/includes/post.php outputs the sample permalink and an edit button. It can be filtered like this: add_filter('get_sample_permalink_html','my_sample_permalink',10,2); function my_sample_permalink ($page_link,$id){ $page = ...


2

I tracked the function calls in my theme (a child theme of Oenology by Chip Bennett) and wp-include that generate the links, found the home_url() function, and then wrote these functions for my site: function gregory_make_relative($url='') { return preg_replace( '#^https?://[^/]+/#iu', '/', $url, 1 ); } add_filter( 'home_url', 'gregory_make_relative', ...


2

To add a page number regardless to any plugin … use filters. Do not change the plugin file. You cannot run updates other wise. Example: <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 Add page number to title * Description: Adds <code> | Page $number</code> to the page title. * License: MIT * License URI: ...


2

It is suppose to work this way. Joost's plugin only gives you a great tool for you to optimize your snippet. If you haven't done any optimizations whatsoever, like creating an awesome brief description of what your content is all about, Google will probably try to figure out what's the best bit of content by their own. Just a minor edit, Google just ...


2

Just rename the plugin dir through FTP and it'll deactivate. It's probably clashing with another plugin...


2

This was caused by a small bug in my first implementation of the rel="next" and rel="prev" features that Google launched 2 weeks ago in my WordPress SEO plugin. That bug has been fixed, you're up to date and the 404's should go away soon enough, nothing to worry about!


2

Now I do have quite an aggressive caching turned on with WP Super Cache. Does it still matter if I force-rewrite the titles then? Or in my case it doesn't change a thing since pages are pre-generated and served as static content? Yes it does matter because you are not serving cached content 100% of the time and you also have to think about the ...


2

what you are looking for is call in the WordPress world a MetaBox and just like Yoast SEO you need to use add_meta_box() function to add your own. there is a great tutorial and class you can use in your plugin at deluxeblogtips.com I would suggest you use that for a starting point.


2

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 ...


2

It's called Author Rich Snippets. Your link needs to look like <link href="https://plus.google.com/115911773396772351667?rel=author"/>Your Name</a> The Simple Way To Set Up Author Rich Snippets There are a few things you need in order to step up Author Rich Snippets: A public Google+ profile. Make sure to upload a decent looking profile ...


2

That plugin loads its language the moment its main file is included: load_plugin_textdomain( 'wordpress-seo', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); So when your locale filter is used, the language is already there. :/ Move your small plugin into the mu-plugins directory. You can create it if it doesn’t exists in wp-content. That ...


2

It's normal. If you entered a website title in Settings => General, this is the title will be taken into account. WordPress SEO by Yoast SEO plugin doesn't rewrite the title chosen in WordPress by default.



Only top voted, non community-wiki answers of a minimum length are eligible