How to change the page break numbering?

Put this function in you functions.php – function the_dramatist_wp_link_pages( $args=”” ) { global $page, $numpages, $multipage, $more; $defaults = array( ‘before’ => ‘<p>’ . __( ‘Pages:’ ), ‘after’ => ‘</p>’, ‘link_before’ => ”, ‘link_after’ => ”, ‘next_or_number’ => ‘number’, ‘separator’ => ‘ ‘, ‘nextpagelink’ => __( ‘Next page’ ), ‘previouspagelink’ => __( ‘Previous page’ ), … Read more

Display content from another site page using a shortcode

You can create a shortcode as below: function wpse250662_post_content_shortcode($atts) { $args = shortcode_atts( array( ‘pagename’ => ” ), $atts ); $query = new WP_Query( $args ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); $content = apply_filters(‘the_content’,get_the_content( )); ob_start(); ?> <div class=”content”> <?php echo $content; ?> </div> <?php endwhile; endif; wp_reset_postdata(); return … Read more

How do you pass parameters TO a shortcode?

Let’s say you have a form that sends the data in the following way: <form method=”post” name=”car-select” action=”<?php echo site_url(‘/my-page/’); ?>”> <select name=”make”> <option value=”benz”>Benz</option> <option value=”bmw”>BMW</option> <option value=”audi”>Audi</option> </select> <input type=”submit” value=”Find my dream car!”/> </form> Now you want to query some posts based on users choice right? This is where $_POST comes in … Read more

How can i remove the paragraph from shortcodes content?

The shortcodes, since they are inserted in the editor, comply to editor rules. Hitting the return in editor will generate a paragraph tag, just like any other text. It’s one of the TinyMCE features. To read more about TinyMCE check out their forum and especially this thread

Using do_shortcode with variables?

Your syntax is broken, the quote marks do not match. Try to separate data from the shortcode template, and use sprintf(): $shortcode = sprintf( ‘[pw_map address=”%1$s %2$s %3$s %4$s” width=”%5$s” height=”200px”]’, $address, $city, $province, $postalcode, ‘100%’ ); echo do_shortcode( $shortcode ); That’s much easier to read, and it is harder to create syntax errors. 🙂

wp_editor returns the shortcode and not render the output

try doing this <?php $footer = get_option(‘footer_options’); $footer_content = array($footer[‘footer_content_1’], $footer[‘footer_content_2’]); foreach($footer_content as $content) { $content = apply_filters(‘the_content’, $content); echo'<aside class=”tab-content”> ‘.$content.’ </aside>’; } ?> I once had the same issue and applying the content filter solved it

How to add and submit input fields using a shortcode?

You can create the shortcode like this: add_shortcode( ‘add_fields’, ‘input_fields’ ); function input_fields( $atts ) { if ( isset( $_POST[‘gg’] ) ) { $post = array( ‘post_content’ => $_POST[‘content’], ‘post_title’ => $_POST[‘title’] ); $id = wp_insert_post( $post, $wp_error ); } ?> <form method = “post”> <input type=”text” name=”title”> <input type=”text” name=”content”> <input type=”submit” name=”gg”> </form> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)