short code inside [columns] dose not work

Best WordPress theme for festivals or other events with responsive, clean and unique design.
GK User
Fri May 09, 2014 7:43 pm
I'm in the middle of making a two column page http://v2.fishingstars.ca/wp/sign-up/ with the short code on the theme [columns] . On the 2ed column i would like to add a form page that a WordPress plugin made for us.. they use short codes as well. but when i put the shot code in the open and closed tags of the column it dose not works..

when it comes out of the short code it works great.

do you know how i can fix this problem.


p.s Love the Fest Theme.
User avatar
Fresh Boarder

GK User
Sat May 10, 2014 1:19 pm
It is because in general you could not nest shortcodes inside another shortcode.
But you might try this solution... Please edit file:
wp-content/themes/Fest/gavern/helpers/helpers.shortcodes.php
find this section:
Code: Select all
      function gavern_ts_columns($atts, $content) {   
          // get the optional width value
          extract(shortcode_atts( array('width' => ''), $atts));
          // get the columns         
          preg_match_all( '@\[column\](.*?)\[/column\]@mis', $content, $columns);
          $output = '';
         
          if(isset($columns[1])) {
             //
             if($width != '') $width = explode(',', $width);
             // generate output
             $output = "<div class=\"gk-columns\" data-column-count=\"" . count($columns[1]) . "\">\n";
             // generate the list items
             if(count($columns[1])) {
                // iterator
                $iter = 0;
                //
                foreach($columns[1] as $column) {
                   if($width == '') {
                      $output .= "<div>" . $column . "</div>\n";
                   } else {
                      $output .= "<div style=\"width: ".$width[$iter]."%;\">" . $column . "</div>\n";
                   }
                   //
                   $iter++;
                }
             }
             // close the list
             $output .="\n</div>";
          }
          return $output;
      }

and modify line:
Code: Select all
preg_match_all( '@\[column\](.*?)\[/column\]@mis', $content, $columns);

so it looks this way:
Code: Select all
preg_match_all( '@\[column\](.*?)\[/column\]@mis', do_shortcode($content), $columns);


Please write back if it will work.
User avatar
Moderator

GK User
Mon May 12, 2014 7:00 pm
Amazing Cyberek.

It works Great.

Thank you Very Much.
User avatar
Fresh Boarder

GK User
Mon May 12, 2014 8:44 pm
Ok. Thanks for the info.
If you will have any other questions (not relative to this thread), feel free to post new forum threads - it allows us to answer you faster.
User avatar
Moderator


cron