How do grab the main loop, with conditions, and output via shortcodes

Are you sure you want to do this in this manner? Normally a section like this might be written to the page template somehow and not called via the content editor. That being said, this should do what you need: add_shortcode( ‘show_xyz_news’, ‘xyz_news_query’ ); function xyz_news_query() { $args = array( ‘posts_per_page’ => 3, ‘category_name’ => … Read more

While doing a bulk upload the Media Images are showing blank?

Your $loopimage field in your spreadsheet only has the filename and not the file path, but wp_insert_attachment needs the full pathname in the 2nd argument. Additionally though, if you have uploaded all of these images using the Media Manager interface then they will already be stored as attachments. You’d be better off using the file … Read more

How can you alter the name of attributes in a shortcode?

function jk_WPSCEX_add_message( $atts ) { $output=”<a href=”” . $atts[‘link’] . ‘”>’ . $atts[‘text’] . ‘</a>’; return $output; } using the above function shortcode is generated in the form of [jk link=”http://jaskokoyn.com” text=”Like me on Facebook”] OR For Enclosed type of shortcode: function jk_WPSCEX_add_message( $atts, $content = null ) { $output=”<a href=”” . $atts[‘link’] . ‘”>’ … Read more

display php code in header using wp_head()

As per my understanding you wish to print content from get_option below . For that please write below code to funcitons.php file: function my_facebook_tags() { return $options = get_option(“p2h_theme_options”); } And below code within your header file below to wp_head() write: <?php echo my_facebook_tags();?> Hope this will resolve the issue for you! EDITED: Try the … Read more

Run Custom HTML5

I don’t know anything about reveal.js other than what I just googled, but you can copy/paste a page.php from your theme and name it page-{slug}.php for a specific page then add any code you want into the content area of the page. Assuming your theme doesn’t break this format in any way. Instructions on making … Read more

Unsure of my options, Multi-blog?

After a lot of searching around, it occurred to me that what I was trying to do was essentially to create a social network. Having search for WordPress Social Network plugins I discovered and am using Buddypress.