Need help with theme

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by MicrotechXP, Dec 20, 2009.

  1. MicrotechXP

    MicrotechXP New Member

    Messages:
    7,644
    Likes Received:
    0
    Trophy Points:
    0
    I have been messing with a theme that I bought and I can't seem to get one thing done. The posts are limited to a certain amount on the home page and I want to make the limit more. Like from 500 words to 1500 words before limited (example).

    Here is the code I have found for the limiting:

    PHP:
    /************************************************************\
    * WP NOW - Content Limit
    \************************************************************/

    function wpn_content_limit($content$ilimit false)
    {
        
    $limit = ($ilimit) ? $ilimit 270;
        
    $pad="...";
        
    $content strip_tags($content);
        if(
    strlen($content) > $limit)
        {
            
    $content substr($content,0,$limit);
        }
        echo 
    $content.$pad;
    }

    /************************************************************\
    * WP NOW - Content Show
    \************************************************************/

    function wpn_content_show($limit)
    {
        if(
    is_category() || is_archive())
        {
            if (!empty(
    $post->post_excerpt))
            {
                
    the_excerpt();
            }
            else
            {
                
    wpn_content_limit(get_the_content(), $limit);
            }
        }
        else
        {
            
    wpn_content_limit(get_the_content(), $limit);
        }
    }
    What do I need to do to make the limit more?

    Here is the website: http://ddrun.x10hosting.com/
     
  2. ChatIndia

    ChatIndia Community Advocate Community Support

    Messages:
    1,408
    Likes Received:
    30
    Trophy Points:
    48
    You have to change 270 to 1000.
     
  3. MicrotechXP

    MicrotechXP New Member

    Messages:
    7,644
    Likes Received:
    0
    Trophy Points:
    0
    I did that, but it still is the same. :/
    Edit:
    *bump*
     
    Last edited: Dec 21, 2009
  4. misson

    misson Community Paragon Community Support

    Messages:
    2,572
    Likes Received:
    72
    Trophy Points:
    48
    Since $limit is passed as an argument to wpn_content_show (and thence to wpn_content_limit), you need to find where wpn_content_show is called. There are other approaches, but that's the best.
     
  5. MicrotechXP

    MicrotechXP New Member

    Messages:
    7,644
    Likes Received:
    0
    Trophy Points:
    0
    Thats the only one I could find. :/
     
  6. descalzo

    descalzo Grim Squeaker Community Support

    Messages:
    9,375
    Likes Received:
    327
    Trophy Points:
    83
    wpn_content_show should be called from somewhere in the theme, probably not the same file that you found the above. Maybe from index.php . Look in there.
     
  7. misson

    misson Community Paragon Community Support

    Messages:
    2,572
    Likes Received:
    72
    Trophy Points:
    48
    The preferable way to find a call to the function would be to use an IDE (e.g. Eclipse+PDT, which is bundled in the Eclipse for PHP Developers package on the Eclipse download page), but IDEs often have a steep learning curve if you've never used one before. If you're using an MS Windows box, you can use Windows search to identify files containing wpn_content_show, then use a text editor to search within files. If you have Notepad++, you could use the "Find in Files" command and skip the Windows search (if you don't have Notepad++, try it out). Alternatively, use something like wingrep to search all the theme scripts.
     

Share This Page