Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End adding a control structure

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37750
    gmox
    Participant

    I’m trying to add this if else (do nothing) statement:


    } else {}; ?

    around this paragraph:





    All


    if(get_post_custom_values('category_filter')) :

    $cats = get_post_custom_values('category_filter');

    foreach ( $cats as $cat ) {
    $catsluglink = ''.$cat = str_replace('-',' ',$cat).' ';
    $acats[] = $catsluglink;
    }

    $cat_string = join(' ', $acats);
    echo $cat_string;
    endif;

    ?>


    Should be easy but I keep getting syntax errors.
    Thanks, Dan

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.