[jQuery]Adding shortcode

Seeing the form was for feedback purposes and not a lot was need I implemented a simple form of my own. jQuery: <form method=’post’ id=’feedback-form’>\ <textarea name=”feedback-message” id=’feedback-message’ rows=”10″ cols=”10″ required />\ <input type=”submit” name=”feedback-submit” id=’feedback-submit’ class=”ninja-forms-field btn btn-primary custom-button red-btn” value=”Thanks!” \ placeholder=”Type your comments/suggestions/functionality requests” />\ </form>\ PHP add_action( ‘init’, ‘feedback_form_submit’ ); function … Read more

Pagination in plugin’s backend

In the admin back-end of a plugin, you can’t use the query_vars hook and the get_query_var built in function since the page itself is a query parameter. To get around this, I simply add a new query parameter to the end of your plugin page link called, ‘&pagenum=#” and I pull it out manually using: … Read more

If no image, bigger text

This should work. <div class=”feature-section-1″> <?php $posts = get_posts( “tag=’tagtitle’&numberposts=1″ ); ?> <?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?> <a href=”https://wordpress.stackexchange.com/questions/210837/<?php echo get_permalink($post->ID); ?>” > <?php if ( has_post_thumbnail() ): ?> <h3><?php echo $post->post_title; ?></h3> <div class=”false-excerpt-div”><?php the_excerpt(); ?></div> <?php the_post_thumbnail(‘columner-thumb’); ?> <?php else: ?> … Read more