### Robots.txt Example Source: https://docs.wpslimseo.com/slim-seo/meta-robots-tag This is an example of how the robots.txt file might look after Slim SEO adds its rules. Highlighted lines indicate additions by the plugin. ```text User-agent: * Disallow: /wp-admin/ Disallow: /?s= Disallow: /page/*/?s= Disallow: /search/ Allow: /wp-admin/admin-ajax.php Sitemap: http://ss.test/sitemap.xml ``` -------------------------------- ### URL Normalization Examples Source: https://docs.wpslimseo.com/slim-seo/redirection These examples show various URL formats that Slim SEO normalizes to a standard format for matching. ```text http(s)://domain.com/path/to/url http(s)://domain.com/path/to/url/ /path/to/url /path/to/url/ path/to/url path/to/url/ ``` -------------------------------- ### Breadcrumbs Example Source: https://docs.wpslimseo.com/slim-seo/breadcrumbs An example of breadcrumbs as they appear on a website, showing the page hierarchy. ```text Home » Slim SEO » Breadcrumbs ``` -------------------------------- ### WooCommerce Breadcrumb Examples Source: https://docs.wpslimseo.com/slim-seo/integrations/woocommerce Examples of how Slim SEO breadcrumbs adapt to WooCommerce pages, providing a consistent navigation structure across your shop. ```html Home > Shop Home > Shop > Category Home > Shop > Category > Product ``` -------------------------------- ### Add Open Graph Tag Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the list of supported Open Graph tags to add new ones. This example adds 'og:video'. ```php add_filter( 'slim_seo_open_graph_tags', function( $tags ) { $tags[] = 'og:video'; return $tags; } ); ``` -------------------------------- ### Set Open Graph Tag Value Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the value of a specific Open Graph tag. This example sets the value for 'og:video'. ```php add_filter( 'slim_seo_open_graph_video', function( $value, $tag ) { return 'https://mydomain.com/video.mp4'; }, 10, 2 ); ``` -------------------------------- ### Implement Complex Nested Structures with Dot Notation Source: https://docs.wpslimseo.com/slim-seo-pro/schema/custom-properties Combine dot notation for nested objects and array indices to define intricate data structures. This example shows a list of address objects, each with its own properties. ```json "address": [ { "street": "35 Nguyen Co Thach", "city" : "Hanoi" }, { "street": "12 Le Duc Tho", "city" : "Hanoi" }, ] ``` -------------------------------- ### Add Custom Robots.txt Rule Source: https://docs.wpslimseo.com/slim-seo/meta-robots-tag Use this filter to append custom rules to the robots.txt file. The example adds a rule to disallow crawling of a specific page pattern. ```php add_filter( 'slim_seo_robots_txt', function( $content ) { // Your custom rule. $content .= "Disallow: /page/search/*\n"; return $content; } ); ``` -------------------------------- ### Skip Redirect for Admins Source: https://docs.wpslimseo.com/slim-seo/redirection Use this filter to conditionally skip redirects. This example skips redirects for users with the 'manage_options' capability. ```php add_filter( 'slim_seo_redirection_skip', function( bool $redirect, string $request_url ) { // Skip redirect for admins. if ( current_user_can( 'manage_options' ) ) { return true; } return $redirect; }, 10, 2 ); ``` -------------------------------- ### Modify robots.txt Content Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the content of the `robots.txt` file to add custom disallow rules. This example disallows access to search results pages. ```php add_filter( 'slim_seo_robots_txt', function( $content ) { // Your custom rule. $content .= "Disallow: /page/search/*\n"; return $content; } ``` -------------------------------- ### Analyze Content from ACF Flexible Content Field Source: https://docs.wpslimseo.com/slim-seo-pro/link-manager/integrations An example of using the `slim_seo_link_manager_text` filter to extract and analyze content from an ACF flexible content field. It recursively walks through the field data to gather all text values. ```php add_filter( 'slim_seo_link_manager_text', function( $text, $post_id ) { // Getting content from a flexible content group. $field_data = get_field( 'article_builder' ); $result = []; array_walk_recursive( $field_data, function( $v ) use ( &$result ) { $result[] = $v; } ); $your_text = implode( ' ', $result ); $text.=$your_text; return $text; }, 20, 2 ); ``` -------------------------------- ### Add a Link to Breadcrumbs Source: https://docs.wpslimseo.com/slim-seo/breadcrumbs Use the `slim_seo_breadcrumbs_links` filter to add custom links to the breadcrumbs. This example inserts 'All Categories' between 'Blog' and the post's category on single posts. ```php add_filter( 'slim_seo_breadcrumbs_links', function( $links ) { // Only process single posts. if ( ! is_single() ) { return $links; } $new_links = []; foreach ( $links as $index => $link ) { $new_links[] = $link; // Append new item if the current link is "Blog", which has index = 1. if ( $index === 1 ) { $new_links[] = [ 'url' => 'https://domain.com/all-categories/', 'text'=> 'All Categories', ]; } } return $new_links; } ); ``` -------------------------------- ### Exclude Taxonomies from Meta Box Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the list of taxonomies where the Search Engine Optimization meta box is displayed. This example excludes the 'post_tag' taxonomy. ```php add_filter( 'slim_seo_meta_box_taxonomies', function( $taxonomies ) { return array_diff( $taxonomies, ['post_tag'] ); } ); ``` -------------------------------- ### Hreflang Tags in XML Sitemap Source: https://docs.wpslimseo.com/slim-seo/integrations/translatepress Slim SEO automatically includes hreflang tags for each post in the XML sitemap. This example demonstrates the structure within the sitemap source code. ```xml http://ss.test/hello-world/ 2025-10-20T06:56:36+00:00 My Site en 2025-10-20T06:56:36+00:00 Hello world! http://ss.test/vi/hello-world/ 2025-10-20T06:56:36+00:00 ``` -------------------------------- ### Register Custom Dynamic Variables Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use the `slim_seo_schema_variables` filter to add custom variable groups and options. The variable key should start with an alphabet character and can include dots for organization. ```php add_filter( 'slim_seo_schema_variables', function( $variables ) { // Add a group of 2 custom variables. $variables[] = [ 'label' => 'Custom group label', 'options' => [ // List of group variables in the format: key => label. 'variable1' => 'Label for variable1', 'variable2' => 'Label for variable2', ], ]; return $variables; } ); ``` -------------------------------- ### Change Meta Description via Filter - Custom Field Source: https://docs.wpslimseo.com/slim-seo/meta-description-tag Use the `slim_seo_meta_description` filter to dynamically set a post's meta description. This example retrieves the description from a custom field named 'movie_desc' for posts of the 'movie' post type. ```php add_filter( 'slim_seo_meta_description', function ( $description, $object_id ) { if ( get_post_type( $object_id ) === 'movie' ) { $description = get_post_meta( $object_id, 'movie_desc', true ); } return $description; }, 10, 2 ); ``` -------------------------------- ### slim_seo_schema_{$context}_enable Source: https://docs.wpslimseo.com/slim-seo/hooks Controls whether a specific schema is enabled. Accepts a boolean value. The {$context} placeholder should be replaced with the specific schema type (e.g., 'article', 'local_business'). ```APIDOC ## slim_seo_schema_{$context}_enable ### Description Determines whether a specific schema type is enabled. ### Parameters #### Accepts - A boolean value (true to enable, false to disable). ### Usage Replace `{$context}` with the schema type, e.g., `slim_seo_schema_article_enable`. ``` -------------------------------- ### slim_seo_sitemap_post_type_query_args Source: https://docs.wpslimseo.com/slim-seo/hooks Modifies the query arguments used for fetching posts for the sitemap. Accepts one parameter: an array of query arguments. ```APIDOC ## slim_seo_sitemap_post_type_query_args ### Description Filters the arguments used when querying posts for the sitemap. ### Parameters #### Accepts - An array of WordPress query arguments. ``` -------------------------------- ### Filter Breadcrumb Links Source: https://docs.wpslimseo.com/slim-seo/hooks Use this filter to modify the array of breadcrumb links. Example shows how to remove the 'Blog' link for single posts. ```php add_filter( 'slim_seo_breadcrumbs_links', function( $links ) { if ( is_singular( 'post' ) ) { unset( $links[1] ); // $link[0] = Home, $link[1] = Blog, $link[2] = Category, $link[3] = Post. } return $links; } ); ``` -------------------------------- ### Map Custom Product Attributes to Schema Source: https://docs.wpslimseo.com/slim-seo-pro/schema/integrations/woocommerce Use this format to manually connect custom product attributes to schema properties for variable products. Replace 'name' with your attribute's actual name. ```html {{ product.variants.attributes.name }} ``` -------------------------------- ### Programmatically Register Schema with Hooks Source: https://docs.wpslimseo.com/slim-seo-pro/schema/adding-schemas Use the `slim_seo_schema_settings` filter to register schemas using PHP. This allows for dynamic schema creation and management based on custom logic. ```php add_filter( 'slim_seo_schema_settings', function( array $schemas ): array { $schemas[ 'unique_schema_id' ] = [ 'type' => 'Brand', 'active' => true, 'fields' => [ 'name' => '{{ site.title }}', ], 'location' => [ 'type' => 'singular', 'singular_locations' => [ 'unique_group_id' => [ 'unique_rule_id' => [ 'name' => 'product:post', 'value' => 'all', 'label' => 'All', ] ] ], ], ]; return $schemas; } ); ``` -------------------------------- ### slim_seo_taxonomy_query_args Source: https://docs.wpslimseo.com/slim-seo/hooks Modifies the query arguments used for fetching terms for the sitemap. Accepts one parameter: an array of query arguments. ```APIDOC ## slim_seo_taxonomy_query_args ### Description Filters the arguments used when querying terms for the sitemap. ### Parameters #### Accepts - An array of WordPress query arguments. ``` -------------------------------- ### Hreflang Tags in HTML Source: https://docs.wpslimseo.com/slim-seo/integrations/translatepress TranslatePress automatically adds hreflang tags to your pages' HTML on the front end. This example shows how they appear in the page source. ```html ``` -------------------------------- ### slim_seo_robots_txt Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the content of the robots.txt file. Accepts one parameter: the robots.txt content string. ```APIDOC ## slim_seo_robots_txt ### Description Filters the content of the robots.txt file. ### Parameters #### Accepts - The robots.txt content as a string. ``` -------------------------------- ### Remove a Link from Breadcrumbs Source: https://docs.wpslimseo.com/slim-seo/breadcrumbs Use the `slim_seo_breadcrumbs_links` filter to remove existing links. This example removes the 'Blog' link (index 1) from breadcrumbs on single posts. ```php add_filter( 'slim_seo_breadcrumbs_links', function( $links ) { // Only process single posts. if ( ! is_single() ) { return $links; } // Blog has the index 1. unset( $links[1] ); return $links; } ); ``` -------------------------------- ### Add a Simple Custom Property Source: https://docs.wpslimseo.com/slim-seo-pro/schema/custom-properties Use this method to add a basic key-value pair as a custom property to your schema. This is the most straightforward way to include additional data. ```json "street_address": "35 Nguyen Co Thach, Nam Tu Liem" ``` -------------------------------- ### Allow Only Core Blocks in Slim SEO Source: https://docs.wpslimseo.com/slim-seo/troubleshooting This snippet configures Slim SEO to only process core WordPress blocks by filtering the `slim_seo_allowed_blocks` to include only those starting with 'core/'. ```php add_filter( 'slim_seo_allowed_blocks', function( $blocks ) { return array_filter( $blocks, function( $block ) { return str_starts_with( $block, 'core/' ); } ); } ); ``` -------------------------------- ### Site URL Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the base URL of the website. ```text {{ site.url }} ``` -------------------------------- ### slim_seo_meta_box_context Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the context for the meta box. Accepts one parameter: the meta box context string. ```APIDOC ## slim_seo_meta_box_context ### Description Filters the context where the SEO meta box is displayed. ### Parameters #### Accepts - The meta box context (e.g., 'normal', 'side'). ``` -------------------------------- ### Site Description Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the description (tagline) of the website. ```text {{ site.description }} ``` -------------------------------- ### Filter Meta Title for Specific Post Type Source: https://docs.wpslimseo.com/slim-seo/meta-title-tag Change the meta title for a specific post type ('movie' in this example) by retrieving it from a custom field. This filter has the highest priority. ```php add_filter( 'slim_seo_meta_title', function( $title, $object_id ) { if ( get_post_type( $object_id ) === 'movie' ) { $title = get_post_meta( $object_id, 'movie_title', true ); } return $title; }, 10, 2 ); ``` -------------------------------- ### slim_seo_link_manager_link_suggestions_args Source: https://docs.wpslimseo.com/slim-seo-pro/link-manager/hooks This filter allows you to change the post query arguments used for retrieving suggested posts within the Link Manager. ```APIDOC ## Filter: slim_seo_link_manager_link_suggestions_args ### Description Allows modification of the arguments used for querying posts to suggest in the Link Manager. ### Usage ```php add_filter( 'slim_seo_link_manager_link_suggestions_args', function( $args ) { // Example: Set category ID to 12 $args['cat'] = 12; return $args; } ); ``` ### Parameters - `$args` (array) - The query arguments for suggested posts. ``` -------------------------------- ### Exclude Post Types from Meta Box Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the list of post types where the Search Engine Optimization meta box is displayed. This example excludes 'event' and 'page' post types. ```php add_filter( 'slim_seo_meta_box_post_types', function( $post_types ) { return array_diff( $post_types, ['event', 'page'] ); } ); ``` -------------------------------- ### Post Content Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the current post's full content. ```text {{ post.content }} ``` -------------------------------- ### Output Breadcrumbs Using Shortcode Source: https://docs.wpslimseo.com/slim-seo/breadcrumbs Use this PHP snippet to output breadcrumbs anywhere in your theme files. It utilizes the `do_shortcode` function to render the `[slim_seo_breadcrumbs]` shortcode. ```php echo do_shortcode( '[slim_seo_breadcrumbs]' ); ``` -------------------------------- ### slim_seo_meta_description Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the meta description for the current page. Accepts one parameter: the meta description string. ```APIDOC ## slim_seo_meta_description ### Description Filters the meta description tag content. ### Parameters #### Accepts - The meta description string. ``` -------------------------------- ### Change Breadcrumbs Taxonomy for Custom Post Types Source: https://docs.wpslimseo.com/slim-seo/breadcrumbs Use the `slim_seo_breadcrumbs_args` filter to change default breadcrumb attributes like taxonomy for specific post types. This example changes the taxonomy to 'group' for the 'service' post type. ```php add_filter( 'slim_seo_breadcrumbs_args', function( $args ) { if ( is_singular( 'service' ) ) { $args['taxonomy'] = 'group'; } return $args; } ); ``` -------------------------------- ### slim_seo_open_graph_{$short_name} Source: https://docs.wpslimseo.com/slim-seo/hooks Filters a specific Open Graph tag. The {$short_name} placeholder should be replaced with the short name of the OG tag (e.g., 'title', 'description'). Accepts one parameter: the tag value. ```APIDOC ## slim_seo_open_graph_{$short_name} ### Description Filters a specific Open Graph tag. ### Parameters #### Accepts - The value of the specific Open Graph tag. ### Usage Replace `{$short_name}` with the tag name, e.g., `slim_seo_open_graph_image`. ``` -------------------------------- ### Define License Key in wp-config.php Source: https://docs.wpslimseo.com/slim-seo-pro/license Define your license key in wp-config.php to prevent it from being saved in the database and to keep it hidden. This method ensures the key is not exposed in the admin area. ```php define( 'SLIM_SEO_PRO_KEY', 'your license key here' ); ``` -------------------------------- ### Post Tags Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert a comma-separated list of the current post's tags. ```text {{ post.tags }} ``` -------------------------------- ### slim_seo_meta_box_priority Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the priority for the meta box. Accepts one parameter: the meta box priority string. ```APIDOC ## slim_seo_meta_box_priority ### Description Filters the priority of the SEO meta box on the edit screen. ### Parameters #### Accepts - The meta box priority (e.g., 'high', 'low', 'default'). ``` -------------------------------- ### slim_seo_meta_description_generated Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the auto-generated meta description. Accepts one parameter: the generated meta description string. ```APIDOC ## slim_seo_meta_description_generated ### Description Filters the automatically generated meta description. ### Parameters #### Accepts - The generated meta description string. ``` -------------------------------- ### Post Excerpt Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the current post's excerpt. ```text {{ post.excerpt }} ``` -------------------------------- ### slim_seo_schema_{$context} Source: https://docs.wpslimseo.com/slim-seo/hooks Modifies the properties of a specific schema. Accepts one parameter: an array of schema properties. The {$context} placeholder should be replaced with the specific schema type. ```APIDOC ## slim_seo_schema_{$context} ### Description Filters the properties of a specific schema type. ### Parameters #### Accepts - An array of schema properties. ### Usage Replace `{$context}` with the schema type, e.g., `slim_seo_schema_local_business`. ``` -------------------------------- ### Site Title Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the title of the website. ```text {{ site.title }} ``` -------------------------------- ### Enable Title Tag Theme Support Source: https://docs.wpslimseo.com/slim-seo/meta-title-tag Add theme support for the 'title-tag' feature in WordPress. This is a prerequisite for managing meta titles effectively. ```php add_theme_support( 'title-tag' ); ``` -------------------------------- ### Site Icon URL Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the URL of the website's icon (favicon). ```text {{ site.icon }} ``` -------------------------------- ### Post URL Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the URL of the current post. ```text {{ post.url }} ``` -------------------------------- ### Enable User Sitemap Source: https://docs.wpslimseo.com/slim-seo/xml-sitemap Add this filter to include a user sitemap in your XML sitemap. By default, Slim SEO does not include user sitemaps. ```php add_filter( 'slim_seo_user_sitemap', '__return_true' ); ``` -------------------------------- ### Post Slug Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the slug of the current post. ```text {{ post.slug }} ``` -------------------------------- ### Post Taxonomy Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the terms of a specific taxonomy for the current post. Replace `$taxonomy` with the taxonomy slug. ```text {{ post.tax.$taxonomy }} ``` -------------------------------- ### Filter Link Suggestions Query Args Source: https://docs.wpslimseo.com/slim-seo-pro/link-manager/hooks Modify the arguments used for querying suggested posts. Use this to filter suggestions by category. ```php add_filter( 'slim_seo_link_manager_link_suggestions_args', function( $args ) { $args['cat'] = 12; return $args; } ); ``` -------------------------------- ### Author Description Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the biographical description (bio) of the current post's author. ```text {{ author.description }} ``` -------------------------------- ### Post Categories Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert a comma-separated list of the current post's categories. ```text {{ post.categories }} ``` -------------------------------- ### Author Website URL Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the website URL of the current post's author. ```text {{ author.website_url }} ``` -------------------------------- ### slim_seo_skipped_shortcodes Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the array of shortcodes that should be skipped during rendering. Accepts one parameter: an array of shortcode names. ```APIDOC ## slim_seo_skipped_shortcodes ### Description Filters the list of shortcodes that should be ignored by Slim SEO. ### Parameters #### Accepts - An array of shortcode names (strings). ``` -------------------------------- ### Action Hooks Source: https://docs.wpslimseo.com/slim-seo/hooks Actions are hooks that allow you to execute custom code at specific points in the plugin's execution. They do not return values but perform actions. ```APIDOC ## Action Hooks ### `slim_seo_init` Fires after all plugin features are registered and before they run. Use this action to register or disable a feature. ### `slim_seo_sitemap_post` and `slim_seo_sitemap_term` Fires after outputting entry for post or term in the sitemap XML. These actions accept one parameter (`$post` or `$term`). Use this action to output more data for the sitemap. ``` -------------------------------- ### Author First Name Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the first name of the current post's author. ```text {{ author.first_name }} ``` -------------------------------- ### Post Title Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the current post's title. ```text {{ post.title }} ``` -------------------------------- ### Current Page URL Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the URL of the currently viewed page. ```text {{ current.url }} ``` -------------------------------- ### slim_seo_link_manager_search_args Source: https://docs.wpslimseo.com/slim-seo-pro/link-manager/hooks This filter allows you to modify the post query arguments used when searching for posts within the Link Manager. ```APIDOC ## Filter: slim_seo_link_manager_search_args ### Description Allows modification of the arguments used for querying posts during search operations in the Link Manager. ### Usage ```php add_filter( 'slim_seo_link_manager_search_args', function( $args ) { // Example: Set category ID to 12 $args['cat'] = 12; return $args; } ); ``` ### Parameters - `$args` (array) - The query arguments for searching posts. ``` -------------------------------- ### Author Username Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the username of the current post's author. ```text {{ author.username }} ``` -------------------------------- ### Author Nicename Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the nicename of the current post's author. ```text {{ author.nicename }} ``` -------------------------------- ### slim_seo_meta_box_taxonomies Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the taxonomies where the meta box is displayed. Accepts one parameter: an array of taxonomy slugs. ```APIDOC ## slim_seo_meta_box_taxonomies ### Description Filters the taxonomies for which the SEO meta box will be shown. ### Parameters #### Accepts - An array of taxonomy slugs. ``` -------------------------------- ### Add Custom Fields to Scanner Source: https://docs.wpslimseo.com/slim-seo-pro/link-manager/hooks Include content from custom fields in the plugin's link scanner. Specify the meta key of the custom field to be analyzed. ```php add_filter( 'slim_seo_link_manager_post_custom_fields', function( $fields ) { $fields[] = 'my-text-field'; return $fields; } ); ``` -------------------------------- ### Current User Display Name Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the display name of the currently logged-in user. ```text {{ user.display_name }} ``` -------------------------------- ### Add WooCommerce Dynamic Variables to Meta Tags Source: https://docs.wpslimseo.com/slim-seo/integrations/woocommerce Utilize WooCommerce-specific dynamic variables within Slim SEO's meta tag configuration to customize titles and descriptions based on product data. ```html ``` -------------------------------- ### slim_seo_canonical_url Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the canonical URL for the current page. Accepts one parameter: the canonical URL string. ```APIDOC ## slim_seo_canonical_url ### Description Filters the canonical URL for the current page. ### Parameters #### Accepts - The canonical URL string. ``` -------------------------------- ### slim_seo_sitemap_taxonomies Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the array of taxonomies included in the XML sitemap. Accepts one parameter: an array of taxonomies. By default, all public taxonomies are included. ```APIDOC ## slim_seo_sitemap_taxonomies ### Description Filters the taxonomies that will be included in the XML sitemap. ### Parameters #### Accepts - An array of taxonomy slugs. ``` -------------------------------- ### Site Language Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the language code of the website. ```text {{ site.language }} ``` -------------------------------- ### Post Thumbnail URL Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the URL of the current post's featured image (thumbnail). ```text {{ post.thumbnail }} ``` -------------------------------- ### Post Date Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the published date of the current post. ```text {{ post.date }} ``` -------------------------------- ### Modify Post Query Arguments for Sitemap Source: https://docs.wpslimseo.com/slim-seo/xml-sitemap Customize the database query arguments used to fetch posts for the XML sitemap. This allows for changes like setting the number of posts per page. The parameters follow the WP_Query class standards. ```php add_filter( 'slim_seo_sitemap_post_type_query_args', function( $query_args ) { // Change the number of URLs $query_args['posts_per_page'] = 5000; return $query_args; } ); ``` -------------------------------- ### Author Nickname Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the nickname of the current post's author. ```text {{ author.nickname }} ``` -------------------------------- ### slim_seo_open_graph_tags Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the array of Open Graph tags. Accepts one parameter: an array of Open Graph tag data. ```APIDOC ## slim_seo_open_graph_tags ### Description Filters the Open Graph tags before they are outputted. ### Parameters #### Accepts - An array of Open Graph tag data. ``` -------------------------------- ### Author Posts URL Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the URL to the current post's author archive page. ```text {{ author.posts_url }} ``` -------------------------------- ### slim_seo_sitemap_post_types Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the array of post types included in the XML sitemap. Accepts one parameter: an array of post types. By default, all public post types are included. ```APIDOC ## slim_seo_sitemap_post_types ### Description Filters the post types that will be included in the XML sitemap. ### Parameters #### Accepts - An array of post type slugs. ``` -------------------------------- ### Author Last Name Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the last name of the current post's author. ```text {{ author.last_name }} ``` -------------------------------- ### slim_seo_schema_graph Source: https://docs.wpslimseo.com/slim-seo/hooks Filters the array of schema graph before it's outputted as JSON. Accepts one parameter: the array of schema graph. ```APIDOC ## slim_seo_schema_graph ### Description Filters the array of schema graph before it's outputted as JSON. ### Parameters #### Accepts - An array of schema graph data. ``` -------------------------------- ### Author Display Name Variable Source: https://docs.wpslimseo.com/slim-seo-pro/schema/dynamic-variables Use this variable to dynamically insert the display name of the current post's author. ```text {{ author.display_name }} ```