Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Multi-language problem #1021
    Kim Arild
    Participant

    The same problem is also for the button text.

    in reply to: Limit blog view to category #1017
    Kim Arild
    Participant

    Yes, the category ID shall be “1”.

    in reply to: Limit blog view to category #997
    Kim Arild
    Participant

    This is how my functions.php looks like:

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    
    if ( ! function_exists( 'include_category' ) ) :
    function include_category( $query ) {
       if ( $query->is_front_page() && $query->is_main_query() ) {
           $query->set( 'cat', '1' );
       }
    }add_action( 'pre_get_posts', 'include_category' );
    endif;
    ?>
    in reply to: Limit blog view to category #996
    Kim Arild
    Participant

    Hi. Thank you for the reply. I have tried this now, but it still shows all posts instead of just from category 1.

Viewing 4 posts - 1 through 4 (of 4 total)