Display the posts in a category with
Display the posts in a category with <select id="
Display the posts in a category with <select id="
So just thought I would update with the solution I came up with incase anyone run across this in the future. What I did was rebuild the url in the function and pass the ids in the url to the template page. function custom_bulk_action() { global $typenow; $post_type = $typenow; if($post_type == ‘post_type’) { // … Read more
You need to define $wpdb as global. Try this code. global $wpdb; $mail = $_POST[’email’]; $table = $wpdb->prefix . ‘members’; $result = $sql->get_results( “SELECT * FROM $table WHERE email = %s”, $mail);
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
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
You can use ‘publish’ === get_post_status( $id ), where $id could be the current page ID retrieved via get_the_ID() or any other.