Need help with theme

MicrotechXP

New Member
Messages
7,644
Reaction score
0
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/
 

MicrotechXP

New Member
Messages
7,644
Reaction score
0
Points
0
I did that, but it still is the same. :/
Edit:
*bump*
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
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.
 

MicrotechXP

New Member
Messages
7,644
Reaction score
0
Points
0
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.

Thats the only one I could find. :/
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
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.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
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.
 
Top