Shortcode showing at top of post
-
I have created numerous custom short-codes for my new website and they work fine. Only problem is when I insert them into page content they go straight to the top of the post -rather than the exact point i pasted the code. ANy ideas why?
<?php function video_shortcode( $atts ) { extract(shortcode_atts(array( 'title' => '', 'url' => '', ), $atts)); echo '<div class="video-hug v-page relative dumb"><div class="title dumber"><h1 class="h1">' . $title . '</h1></div><a class="video-link" href="' . $url . '"></a></div> '; } add_shortcode('video', 'video_shortcode'); ?><?php function displayLatestTweet($twitterID){ include_once(ABSPATH.WPINC.'/rss.php'); $latest_tweet = fetch_rss("https://search.twitter.com/search.atom?q=from:" . $twitterID . "&rpp=1"); echo $latest_tweet->items[0]['atom_content']; } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Shortcode showing at top of post’ is closed to new replies.