Results 1 to 6 of 6

Thread: How to Split WordPress Content Into Two or More Columns?

  1. #1
    Join Date
    Jun 2009
    Posts
    230

    How to Split WordPress Content Into Two or More Columns?

    Hi friends,
    I have done the PHP programming language to great extent but still there are many doubts that I am unable to resolve.!! I don't know about the splitting of WordPress content. So I thought that posting you would help me.!! So please explain me about the splitting WordPress Content into two or more columns.!! Please reply me as soon as possible. Thanks in Advance for the Help.!!

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    Re: How to Split WordPress Content Into Two or More Columns?

    You should know about the WordPress more clearly before moving moving into the depth. WordPress is a great CMS (Content Management System). But for implementing the features of that needs more logical thinking from your side. The content for your page or post is usually output by the theme code using a single function call, which is :
    Code:
    the_content(args);
    Hope that you get this basic point of the WordPress.

  3. #3
    Join Date
    Mar 2008
    Posts
    349

    Re: How to Split WordPress Content Into Two or More Columns?

    In many scenarios it becomes necessary to split the content into two or more blocks. For doing this you should use get_the_content() function. WordPress provides a get_the_content() function to return content as a PHP variable. You can use that function for splitting the content of the WordPress into two or more columns. To split your content, you will have to locate your theme folder. Your theme folder would be in the installed directory.

  4. #4
    Join Date
    Mar 2008
    Posts
    672

    Re: How to Split WordPress Content Into Two or More Columns?

    The following are the few solutions to determine where the divisions occurs when using the get_the_content() function :
    1. You can split the content at HTML tags such as h2 headings. But the main drawback of this is that it requires the content writer to know a little HTML and it’s not very versatile. Also you cannot allow two headings in one column.
    2. The other method is that you can pass it by using the WordPress shortcode. When compared this to the first option, this is more flexible.

  5. #5
    Join Date
    May 2008
    Posts
    2,389

    Re: How to Split WordPress Content Into Two or More Columns?

    I think that it would be better to use the WordPress <!--more--> tag. Using the <!--more--> tag offers several advantages which are as follows :
    1. A toolbar button called more is available in both the visual and HTML editing pane.
    2. You can place the divisions anywhere in the content.
    3. It’s easy for non-technical users to understand how the content will be split.

  6. #6
    Join Date
    Jul 2006
    Posts
    289

    Re: How to Split WordPress Content Into Two or More Columns?

    To split your content, you will have to locate your theme folder or if it is not existing, you can create a functions.php file and add the following function within a <?php … ?> block :
    PHP Code:
    function split_content() { 
         
            global 
    $more
            
    $more true
            
    $content preg_split('/<span id="more-\d+"><\/span>/i'get_the_content('more')); 
            for(
    $c 0$csize count($content); $c $csize$c++) { 
                
    $content[$c] = apply_filters('the_content'$content[$c]); 
            } 
            return 
    $content
         
        } 
    Signatures reduce available bandwidth

Similar Threads

  1. Replies: 2
    Last Post: 15-02-2012, 08:17 PM
  2. Replies: 7
    Last Post: 03-08-2010, 11:42 AM
  3. Replies: 3
    Last Post: 28-09-2009, 02:54 PM
  4. what is wordpress? How to install Newer versions of wordpress.
    By Gill_christ in forum Technology & Internet
    Replies: 3
    Last Post: 21-05-2009, 02:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,012,280.17097 seconds with 17 queries