Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] How to show Images only for posts?

Viewing 1 replies (of 1 total)
  • Here’s how you do this.

    Wordprpress Seo 1.0.3

    class-sitemaps.php: Line 312

    Find
    if ( $images_in_sitemap ) {
    Change with

    $post_type = get_post_type($p->ID);
    $images_in_sitemap = isset($options['xml_include_images']) && $options['xml_include_images'];
    if ( $images_in_sitemap && $post_type == 'post' ) {

    To set a checkbox option for admin.
    class-config.php:

    Add after Line 996
    $content .= $this->checkbox('xml_include_images', __("Add images to XML Sitemap."), false);

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] How to show Images only for posts?’ is closed to new replies.