Title: Problems with columns and shortcodes
Last modified: August 24, 2016

---

# Problems with columns and shortcodes

 *  Resolved [NM6](https://wordpress.org/support/users/himahuja/)
 * (@himahuja)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/)
 * I want to use columns or grid whichever lets me split the content width, in a
   page-template. I tried to use the columns shortcode and also added the do_shortcode
   function to enable it in the template. But it doesn’t work; instead it breaks
   the layout.
 * It will be better if I can have columns of uneven width. Has anybody else solved
   this in any other way?

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971308)
 * Hi NM6. The theme available in the wp.org repostitory doesn’t have built-in support
   for shortcodes. You could either upgrade to the version of the theme on the [theme website](http://alxmedia.se/themes/hueman/)
   or use a plugin like [Shortcodes Ultimate](https://wordpress.org/plugins/shortcodes-ultimate/).
 *  [Khunchay](https://wordpress.org/support/users/khunchay/)
 * (@khunchay)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971314)
 * I use this one [http://www.wpexplorer.com/symple-shortcodes/](http://www.wpexplorer.com/symple-shortcodes/)
   it’s really fantastic, you can see what I used it for [here](http://mekongcoffee.com/web-index/)
   and [here](http://mekongcoffee.com/web-apps/). ([theme layout](http://yourdomain.com/wp-admin/themes.php?page=ot-theme-options)
   set to 1 column)
 * For eg. two 1/4 columns the shortcodes look like this:
 *     ```
       [symple_column size="one-fourth" position="first"]
       CONTENT HERE
       [/symple_column]
   
       [symple_column size="one-fourth" position="second"]
       CONTENT HERE
       [/symple_column]
       ```
   
 * The shortcodes on the ‘Web Index’ page are used for columns and boxes, looks 
   like this:
 *     ```
       [symple_column size="one-fourth" position="first"]
   
       [symple_box color="blue" text_align="left" width="100%" float="none"]
       <h4>FIRST BOX</h4>
       [symple_divider style="solid" margin_top="10px" margin_bottom="10px"]
   
       <a href="----" target="_blank">----</a>
       <a href="----" target="_blank">----</a>
       <a href="----" target="_blank">----</a>
       <a href="----" target="_blank">----</a>
   
       [/symple_box]
   
       [symple_box color="blue" text_align="left" width="100%" float="none"]
       <h4>SECOND BOX</h4>
       [symple_divider style="solid" margin_top="10px" margin_bottom="10px"]
   
       <a href="----" target="_blank">----</a>
       <a href="----" target="_blank">----</a>
       <a href="----" target="_blank">----</a>
       <a href="----" target="_blank">----</a>
   
       [/symple_box]
   
       [/symple_column]
       ```
   
 *  Thread Starter [NM6](https://wordpress.org/support/users/himahuja/)
 * (@himahuja)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971422)
 * Hi bdbrown,
 * Yes, I had downloaded both the theme and child master from the website. In my
   hueman > functions > shortcodes.php there is code for column shortcodes. In which
   case, columns should work. I’m guessing, to use them in a template instead of
   a normal page, do I have to add/enable somewhere else also?
 * I don’t want to use Shortcodes Ultimate as its quite heavy, and since the theme
   already has support, it makes it bulky by using external plugin.
 * #khunchay – Thanks for the suggestion. But when the theme has it, I’d prefer 
   first to try and use that. I’d check them out for my other projects.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971445)
 * I just tested the theme column shortcode in a post and it worked without any 
   problems. Here is what I used:
 *     ```
       [column size="two-third"]...[/column]
       [column size="one-third" last="true"]...[/column]
       ```
   
 *  Thread Starter [NM6](https://wordpress.org/support/users/himahuja/)
 * (@himahuja)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971460)
 * Yes, bdbrown, like I said above, it works on normal post, but I am trying to 
   use it in my template file. Which sometimes needs using <do_shortcode> filter
   in functions.php, and I added that too. But still am unable to use it through
   the template. I guess there is some piece of code needed to enable the column
   shortcode to work via templates, which I am missing.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971462)
 * Is the template file something you created? Or something generated by a plugin?
 *  Thread Starter [NM6](https://wordpress.org/support/users/himahuja/)
 * (@himahuja)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971463)
 * I created a custom template moddifying single.php for my custom category.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971469)
 * I just created a copy of single.php, renamed it, created a post with content 
   that included the column shortcodes, selected the new page template file, and
   it displayed the columns without any problems. You mentioned a “custom category.”
   Is that something related to a plugin? Are you using any other plugins to create
   page layouts or content?
 *  Thread Starter [NM6](https://wordpress.org/support/users/himahuja/)
 * (@himahuja)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971475)
 * [@bdbrown](https://wordpress.org/support/users/bdbrown/),
 * You’ve got me all wrong. First, I wouldn’t create a single-x.php if I wasn’t 
   modifying it. Secondly, I am not using columns in the normal post. I am setting
   them up in the single-x.php template itself. Here’s a section of the code from
   my modified single-x.php:
 *     ```
       <?php while ( have_posts() ): the_post(); ?>
       			<article <?php post_class(); ?>>
       				<div class="post-inner group">
   
       					<h1 class="post-title"><?php the_title(); ?></h1>
   
       					<?php if( get_post_format() ) { get_template_part('inc/post-formats'); } ?>
   
       					<div class="clear"></div>
   
       					<div class="entry">
       						<div class="entry-inner">
   
       						<div class="facts group">
   
       						[column size="one-third"]
       							<div id="facts">
       							<h2>Facts</h2>
       							<ul>
       								<li><b>Climate - </b><?php the_field('climate'); ?> </li>
       								<li><b>Altitude - </b><?php the_field('altitude'); ?></li>
       								<li><b>Best Time to Visit - </b><?php the_field('best_time_to_visit'); ?> </li>
       							</ul>
       							</div>
       						[/column]
   
       						[column size="one-third"]
       							<div id="gmap">
       							<div class="responsive-iframe-container">
       							<p><?php the_field('google_map'); ?></p>
       							</div>
       							</div>
       						[/column]
   
       						[column size="one-third" last="true"]
       							<div  id="weather">
       							<p><?php the_field('weather'); ?></p>
       							</div>
       						[/column]
   
       						</div>
   
       						<!-- Introduction -->
       						<p><?php the_field('introduction'); ?> </p>
       ```
   
 * the code in the divs within php tags is from ACF.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971476)
 * OK, got it. Now I think we’re on the same page. To execute a shortcode in the
   template I think you need to do this:
 *     ```
       <?php echo do_shortcode('[column size="one-third"]'); ?>
          some code
       <?php echo do_shortcode('[/column]'); ?>
       ```
   
 * Here’s the [Codex reference](http://codex.wordpress.org/Function_Reference/do_shortcode).
 *  Thread Starter [NM6](https://wordpress.org/support/users/himahuja/)
 * (@himahuja)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971482)
 * [@bdbrown](https://wordpress.org/support/users/bdbrown/),
 * Thanks for sticking with me so far…but it doesn’t work. That’s what confused 
   me. I’ve done this earlier too, and if you look at my very first post, I had 
   tried the “do_shortcode”. Usually you just have to put it in the functions.php
   once and that takes care of it. But I followed your version also, and put it 
   in the single-d.php around the code yet it doesn’t activate the columns.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971494)
 * I’m out of ideas other than a plugin conflict. You might give the “disable them
   all and test one-at-a-time” routine a try and see if that fixes it.
 *  Thread Starter [NM6](https://wordpress.org/support/users/himahuja/)
 * (@himahuja)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971605)
 * [@bdbrown](https://wordpress.org/support/users/bdbrown/),
 * Finally I managed to find a solution for the columns, and that too from within
   the Hueman demo. On the columns demo page sourcode, Alex has used grid with column
   classes. I copied those and they worked, with minor tweaks!
 * For those who might want to use columns in Hueman, here’s how:
 *     ```
       <div class="grid one-fourth"> content </div>
   
       <div class="grid one-half"> content </div>
   
       <div class="grid one-fourth last"> content </div>
       <div class="clear"> </div>
       ```
   
 * You can easily mange your own combination of widths. Take a look at hueman style.
   css line 362 – base grid. And don’t forget to put “clear” after the columns to
   clear the floats.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Problems with columns and shortcodes’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hueman/3.7.27/screenshot.png)
 * Hueman
 * [Support Threads](https://wordpress.org/support/theme/hueman/)
 * [Active Topics](https://wordpress.org/support/theme/hueman/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hueman/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hueman/reviews/)

## Tags

 * [column](https://wordpress.org/support/topic-tag/column/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [width](https://wordpress.org/support/topic-tag/width/)

 * 13 replies
 * 3 participants
 * Last reply from: [NM6](https://wordpress.org/support/users/himahuja/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/problems-with-columns-and-shortcodes/#post-5971605)
 * Status: resolved