Viewing 2 replies - 1 through 2 (of 2 total)
  • You can do something like this:

    add_filter( 'amp_skip_post', 'xyz_amp_skip_old_posts' );
    function xyz_amp_skip_old_posts( $skip, $post_id, $post ) {
        if ( date( 'Y', strtotime( $post->post_date_gmt ) ) < 2015 ) {
            $skip = true;
        }
        return $skip;
    }

    This would skip all posts published earlier than 2015. Warning: code is untested ??

    Thread Starter roxer82

    (@roxer82)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘AMP pages since a determinated date’ is closed to new replies.