Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same here.
    Fatal error: Call to undefined method WPSEO_Options::get_option() in …/wp-content/plugins/glue-for-yoast-seo-amp/classes/class-frontend.php on line 219

    And the backend options are not showing. (Under SEO/AMP)

    You are getting a wrong pagination because you’re modifying the query in the wrong place.
    To modify the category/archive query you should do it using the ‘pre_get_posts’ action and setting the query args there.

    in functions.php add:

    function m_pre_get_posts( $query ) {
        if (!is_admin() && !$query->is_main_query && is_category()) {
            $query->set( 'posts_per_page', 2 );
        } else {
            return $query;
        }
    }
    add_action( 'pre_get_posts', 'm_pre_get_posts' );

    And in if the page is still redirecting to 404, you should check the default posts per page number set in the backend under Settings/Reading -> Blog pages show at most
    By default it’s set to 10, and if you query posts with a number less than the default post per page number the page breaks and redirects to 404. Decrease the Blog pages show at most number and your page will work.

    michelabdo

    (@michelabdo)

    Just place the taxonomies function above the custom post type.

Viewing 3 replies - 1 through 3 (of 3 total)