Shortcode not staying inside div tag

Maybe your form has a float property. So just add overflow hidden to parent div. Take a look here: https://codepen.io/zecka/pen/jObvbmG your code can be like that: <div style=”border: 3px solid green; margin-top: 1em; height: auto; overflow: hidden”> <h2>Blog notifications</h2> <?php echo do_shortcode(‘[forminator_form id=”9979″]’); ?> </div>

Content Visibility for WordPress is not working (Drafts, public etc.)

To see only the “publish” post, you have to specified the “post_status”. The documentation of the wp_get_recent_posts function said, that if no “post_status” is specified the function used the default values “draft, publish, future, pending, private”. $defaults = array( ‘numberposts’ => 10, ‘offset’ => 0, ‘category’ => 0, ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘include’ … Read more

How can i change variable if condition is not met

If the user does not exist then your template should return something to say that the user does not exist instead of attempting to echo out their data, example: <?php $keyuser = get_user_by(‘login’, $username); ?> <?php if(empty($keyuser)): ?> <p>That username does not exist, please check for typos or try a different search cryteria.</p> <?php else: … Read more

Order by meta_key doesn’t work

Current Query $args = array( ‘post_type’ => ‘brands’, ‘meta_query’ => array( array( ‘key’ => ‘br_type’, ‘value’ => ‘Aviation’ ), array( ‘key’ => ‘br_category’ ), array( ‘key’ => ‘br_name’ ) ), ‘posts_per_page’ => -1, ‘orderby’ => [ ‘br_category’ => ‘ASC’, ‘br_name’ => ‘ASC’ ], ‘order’ => ‘ASC’, ‘fields’ => ‘ids’ ); produce this SQL query ‘SELECT … Read more