Best tools for preparing and styling a table [closed]

WP-Table Reloaded is a great plugin which allows you to create tables and use their shortcodes in your post. Bear in mind, however, that not all themes are “table-friendly”. Alternatively, you can try Dean’s FCKeditor Plugin For WordPress, which appears to have an “Insert Table” function to keep you from messing around with HTML. And … Read more

Echoing Shortcode content inside the loop

You need to use do_shortcode built in WordPress function as shown below: if ($like_status) { echo do_shortcode(‘[fb_fans]’); } else { echo do_shortcode(‘[fb_nonfans]’); } Please refer do_shortcode official documentation.

Shortcode into the same shortcode

Referring to the codex article on shortcodes, you cannot use a shortcode within itself…which is to say that the following is invalid: [foo] [foo] [/foo] [/foo] you should probably make an inner-content shortcode or something.

Enclosing Shortcode is acting like self-closing

Remove the space after the shortcode name. add_shortcode( ‘bio_image ‘, ‘bio_image_func’ ); becomes add_shortcode( ‘bio_image’, ‘bio_image_func’ ); I think WordPress is looking for a closing tag for bio_image[space], which doesn’t exist.

If else with shortcodes

This is rather a simple PHP question and almost off topic. You can simplify your code drastically: $metas = array ( ‘twitch’, ‘own3d’, ‘livestream’, ‘ustream’, ‘justin’ ); foreach ( $metas as $meta ) { $value = get_post_meta( $post->ID, $meta, TRUE ); if ( $value ) { echo do_shortcode(“[livestream type=”$meta” channel=”$value”]”); break; } } This will … Read more

Shortcode Strategy

Either way you’re going to need to store the data you retrieve from an external database, in your WordPress database, if you don’t want to continually run the same query on your external database each time the page is accessed. You can either store the data in your WordPress database using Custom Fields (post meta) … Read more

How to build dynamic pages?

Using WP’s templates you can create a page with static content already in it, and just grab the dynamic parts using WP_Query class. <h1>Static Header</h1> <div id=”dynamic_content1″> <?php $recentPosts = new WP_Query(); $recentPosts->query(‘showposts=3’); while ($recentPosts->have_posts()) : $recentPosts->the_post(); the_content(); // Put Loop Stuff Here endwhile; ?> </div> <div id=”other_dynamic_content”> <?php $anotherQuery = new WP_Query(); $anotherQuery->query(‘someotherquery=1’); while … Read more

How to Make Archive ShortCode

That is not a shortcode. Take a look at the Shortcode API for examples of how to do this. Here is your specifc example: function wpse61674_archives_shortcode_cb( $atts ) { return wp_get_archives(‘type=monthly’); } add_shortcode( ‘archives’, ‘wpse61674_archives_shortcode_cb’ );