Description
YM Fast SEO enhances your website with powerful, intuitive, and easy-to-use SEO tools. In today’s digital world, SEO is essential for driving organic traffic and improving your website’s visibility on search engines.
With YM Fast SEO, you can easily manage important aspects of search optimization without unnecessary complexity. Unlike bulky alternatives, this lightweight plugin is efficient, flexible, and easy to extend, allowing you to keep full control over your website’s performance.
Features
- Lightweight & Extendable
- Posts/Taxonomies Meta Tags Fields
- Automated Open Graph, Twitter Card, and Schema.org Markups
- Quick SEO Analysis + Site SEO Health Page
- Services Integration (Analytics + Webmasters)
- Automatic IndexNow Sending
Robots.txt
Editor- Other Useful Tools & Improvement
Extensibility
In addition to the powerful features mentioned above, YM Fast SEO is designed for extensibility. You can easily enhance and customize its functionality to suit your specific needs using the hooks provided. The following actions and filters allow you to add your own meta tags, modify existing meta fields, and integrate additional functionalities, making it easy to adapt the plugin to your unique requirements.
By leveraging these hooks, you can ensure that YM Fast SEO grows with your website, providing you with the flexibility and control necessary for optimal performance.
Actions
ymfseo_after_print_metas
If you need to print specific meta tags or any other content in the <head>
section, you can use the ymfseo_after_print_metas
hook. Simply write the necessary output in its callback function, and the elements will be displayed at the end of the YM Fast SEO output.
// Prints additional meta tags. add_action( 'ymfseo_after_print_metas', function () { echo '<meta name="twitter:domain" content="yanmet.com">'; });
Filters
ymfseo_title_separator
If none of the separators offered in the settings suit you, you can set a custom value using this filter.
/** * Modifies YM Fast SEO separator symbol. * * @param string $sep Separator symbol. * * @return string */ add_filter( 'ymfseo_title_separator', function ( string $sep ) : string { $sep = '<>'; return $sep; });
ymfseo_tags
If you want to add custom tags to use in meta fields, you can use the following filter:
/** * Modifies YM Fast SEO replace tags list. * * @param array $tags Replace tags list. * * @return string */ add_filter( 'ymfseo_tags', function ( array $tags ) : array { $tags = array_merge( $tags, [ '%my_tag%' => 'My replace string', ]); return $tags; });
ymfseo_meta_fields
You can also modify the raw data values, which are later used to generate basic meta tags and other elements.
The ymfseo_meta_fields
filter passes an associative array that you can modify by applying your own logic. It’s crucial to perform a type check on the query object before making changes, as the same ID might be associated with different post records or taxonomy terms.
/** * Modifies YM Fast SEO meta fields. * * Sets ACF field value as default meta description * for custom post type. * * @param array $meta_fields Meta fields array. * @param WP_Post|WP_Post_Type|WP_Term|WP_User|null $queried_object Queried object. * * @return array */ add_filter( 'ymfseo_meta_fields', function ( array $meta_fields, $queried_object ) : array { // Exit if `$queried_object` is null. if ( is_null( $queried_object ) ) { return $meta_fields; } /* * `$queried_object` can be of `WP_Post`, `WP_Post_Type`, * `WP_Term`, and `WP_User` class. */ switch ( get_class( $queried_object ) ) { case 'WP_Post': if ( 'product' == $queried_object->post_type ) { if ( empty( $meta_fields[ 'description' ] ) ) { $meta_fields[ 'description' ] = esc_attr( get_field( 'description', $post->ID ) ); } } break; } return $meta_fields; }, 10, 2 );
ymfseo_schema_org
The ymfseo_schema_org
filter is applied to modify or add new Schema.org entities and parameters.
/** * Modifies Schema.org JSON-LD. * * @param array $schema_org Schema.org data array. * @param WP_Post|WP_Post_Type|WP_Term|WP_User|null $queried_object Queried object. * * @return array */ add_filter( 'ymfseo_schema_org', function ( array $schema_org, $queried_object ) : array { // Exit if `$queried_object` is null. if ( is_null( $queried_object ) ) { return $schema_org; } // Modificate here. return $schema_org; }, 10, 2 );