Support » Fixing WordPress » Trying to create a grid/column shortcode

  • I have been going back and forth, doing a lot of trial and error. What i want to output is a grid/column shortcodes.

    For example [column_one]Lorem Ipsum[/column_one]

    so far this is what i have came up

    /*Grid Shortcode*/
    function grid_one($content = null) {
        return '<div class="one columns">'.$content.'</div>';
    add_shortcode('column_one', 'grid_one' );

    when try to apply the opening and closing shortcode. My text seems to disappear. I’m using skeleton framework and my CSS for that stylesheet is located in this folder called “CSS”.


    When i tried to create a clearfix shortcode. It seems to be working fine with no problems and it clears the floated elements. Here is the code.

    //Clear Shortcode
    function clear_fix($content = null) {
        return '<div class="clearfix"></div>';
    add_shortcode ('clear', 'clear_fix');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Trying to create a grid/column shortcode’ is closed to new replies.