ACF Pro select field problem [closed]

You can loop through your ACF options by using the code below. <?php if( have_rows(‘social_medias’, ‘option’) ): while ( have_rows(‘social_medias’, ‘option’) ) : the_row(); $type = get_sub_field(‘type’); ?> <?php if ($type == “facebook”) { ?> <li> <a href=”#”> <svg viewbox=”0 0 6.5 14″ xmlns=”http://www.w3.org/2000/svg”> <path class=”st0″ d=”M1.4 14h2.9v-7h2l.2-2.5h-2.2v-1.4c0-.3.2-.6.5-.7h1.7000000000000002v-2.4h-2.2c-1.5-.1-2.8 1-2.9 2.5v2h-1.4v2.5h1.4v7z” id=”Layer_3″></path></svg> </a> </li> <?php } … Read more

$wpdb-prepare : Do I have to bind a parameter to the table name?

No, you do not want to swap out the tablename. If you do, the table name will be wrapped in quotes and it will trigger a SQL error. Try: $table = $wpdb->prefix . ‘members’; $qry = $wpdb->prepare(“SELECT * FROM %s”, $table); var_dump($qry); $qry = “SELECT * FROM $table”; var_dump($result); The first string is invalid SQL. … Read more