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’ );

passing markup thought a shortcode attribute

You have quite a bit of markup for that shortcode. Trying to pass all of that as a shortcode is going to be trouble. I pulled it apart to look at it. id=”map” z=”11″ w=”100%” h=”300″ scrollwheel=”false” maptype=”ROADMAP” address=”Southampton, United Kingdom” marker=”true” markerimage=”http://anachronistic.local:9102/wp-content/plugins/_TomRush/inc/js/TinyMCE_additions/modal/../img/icons/music_folk_map.png“ infowindow=”<div class=”marker inside”><img class=”marker icon” alt=”” src=”http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png” /><strong>Southampton</strong><br>Southampton, UK<br><span class=”marker extras”>Some User … Read more

Custom youtube shortcode that uses $content

Shortcode functions accept a second parameter which contains the value in between the shortcode opening and closing tags: function youtube( $atts, $value=”http://” ) { extract( shortcode_atts( array( “width” => ‘620’, “height” => ‘350’, “name”=> ‘movie’, “allowFullScreen” => ‘true’, “allowScriptAccess”=>’always’, ), $atts ) ); return ‘<object style=”height: ‘.$height.’px; width: ‘.$width.’px”><param name=”‘.$name.'” value=”‘.$value.'”><param name=”allowFullScreen” value=”‘.$allowFullScreen.'”></param><param name=”allowScriptAccess” value=”‘.$allowScriptAccess.'”></param><embed … Read more

do_shortcode doesn’t work on some pages

global $options;$fields;$options2;$options3;$symbols; That is the same as: global $options; $fields; $options2; $options3; $symbols; You’ve declared options as a global, but the other variables are just stated, they’re doing nothing, those lines might as well not be there. Next we have: $fields = get_post_meta($post->ID, ‘mod1′, true); But you’re not checking if it’s an error value. if … Read more