wordpress conditional statements

  • Unknown's avatar

    ‘post’,
    ‘post_status’ => ‘publish’,
    ‘category_name’ => ‘TEAM’,
    ‘posts_per_page’ => 7,
    );
    $arr_posts = new WP_Query( $args );

    if ( is_page(‘in-your-corner’) ) {

    $args = array(
    ‘post_type’ => ‘post’,
    ‘post_status’ => ‘publish’,
    ‘category_name’ => ‘in-your-corner’,
    ‘posts_per_page’ => 7,
    );
    $arr_posts = new WP_Query( $args );

    if ( $arr_posts->have_posts() ) :

    while ( $arr_posts->have_posts() ) :
    $arr_posts->the_post();
    ?>
    <article id=”post->


    <!– #main –>

  • Unknown's avatar

    I have this wordpress page with a conditional statement that checks for 2 pages
    ie. 1. if ( is_page(‘ko-team’) ) {
    2. if ( is_page(‘in-your-corner’) ) {

    i can get the first if statement and it delivers the page with the last 7 posts with the category of TEAM

    but the second if staement isnt firing can anyone help?

  • Hi there!

    I’m afraid we can’t help with custom code here. You can try asking in the community forums instead:

    https://wordpress.org/support/forums/.

  • The topic ‘wordpress conditional statements’ is closed to new replies.