Shortcode is running in page editor

Thanks to @mmm I figured it out. What I am doing now is adding the form in between php tags. EXAMPLE of what I was doing ?> <input type=”checkbox” name=”overwrite” value=”true”>Overwrite?<br> <?php What I need to be doing is adding the content that I want to add to the page into a string that is … Read more

create shortcode to list users with specific meta key value

Try this: function thebroker_agents() { global $current_user; $bmail = $current_user->user_email; $user_query = new WP_User_Query( array( ‘meta_key’ => ‘broker_email’, ‘meta_value’ => $bmail, ‘fields’ => ‘all’ ) ); $users = $user_query->get_results(); if (!empty($users)) { $results=”<ul>”; foreach ($users as $user){ $results=”<li>” . $user->display_name . ‘</li>’; } $results=”</ul>”; } else { $results=”No users found”; } wp_reset_postdata(); return $results; } … Read more

Query how many items to show in shortcode

add_shortcode( ‘type_portfolio’, function( $atts, $content = null ){ $atts = shortcode_atts( array( ‘column’ => ‘3’, ‘category’ => ‘0’, ‘ppp’ => -1 ), $atts); extract($atts); $args = array( ‘posts_per_page’ => $ppp, ‘post_type’ => ‘fen_portfolio’ ); if( $category > ‘0’ ){ $args[‘tax_query’] = array( array( ‘posts_per_page’ => -1, ‘taxonomy’ => ‘cat_portfolio’, ‘field’ => ‘term_id’, ‘terms’ => $category … Read more

Shortcode “post_per_page” not working

You have the posts_per_page attribute in your shortcode, but you’re not actually calling it in your WP_Query. Your’re doing a few unnecessary things in your code, but for now, the issue at hand is that you need to add: if( !empty( $posts_per_page )) { $query .= ‘&posts_per_page=”.$posts_per_page; } Before you call: $wp_query->query($query); As it is … Read more

Get URL Param Plugin and Inserting Result in Widget Code

I think the underlying issue here is that shortcodes are not evaluated when placed inside HTML attributes. You could modify the template and output the necessary HTML using PHP and do_shortcode( ‘[urlparam param=”Book” /]’) as an alternative approach: <!– Calendly inline widget begin –> <div class=”calendly-inline-widget” data-url=”<?php echo do_shortcode( ‘[urlparam param=”Book” /]’ ); ?>” style=”min-width:320px;height:580px;”></div> … Read more

Shortcode based chart plugin

I think you need a customized plugin to realize this. What chart engine will you use? You probably have to create a new function in function.php. I recently realized a Google chart plugin to show data in a graph. Maybe this topic will help you: Dynamic data in `wp_register_script` needed