Victory Posted July 27, 2013 Share Posted July 27, 2013 Hi guys, How can I put the post category and date inside a post, below an image gallery? I found how to do this with the post title, but I don't know where to start with the other stuff. function mm_insert_title_func($atts) { global $post; extract(shortcode_atts(array('before' => '', 'after' => '' ), $atts)); $output = "{$before}{$post->post_title}{$after}"; return $output; } add_shortcode('mm-insert-title', 'mm_insert_title_func'); This puts the post title in the main body of the text when I use: [mm-insert-title before='<h2>' after='</h2>'] ...as a shortcode in the post. How do I do a similar thing with the post category and date? Quote Link to comment https://forums.phpfreaks.com/topic/280569-wordpress-putting-category-and-date-within-a-post-below-a-gallery/ Share on other sites More sharing options...
Victory Posted July 27, 2013 Author Share Posted July 27, 2013 bump. Quote Link to comment https://forums.phpfreaks.com/topic/280569-wordpress-putting-category-and-date-within-a-post-below-a-gallery/#findComment-1442417 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.