Grow your CSS skills. Land your dream job.

WordPress Problem

  • # October 16, 2009 at 2:17 am

    when i goto log into my site i get

    Code:
    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-login.php on line 287

    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-login.php on line 299

    At the top of the page, then when i try to log in it go’s to a page with this, and wont let me log in..

    Code:
    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-login.php on line 287

    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-login.php on line 299

    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-includes/pluggable.php on line 662

    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-includes/pluggable.php on line 663

    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-includes/pluggable.php on line 664

    Warning: Cannot modify header information – headers already sent by (output started at /home/moppiei1/public_html/cardarello.com/wp-content/plugins/limit-post.php:1) in /home/moppiei1/public_html/cardarello.com/wp-includes/pluggable.php on line 865

    # October 16, 2009 at 2:53 am

    And if you get rid of the limit-post plugin?

    # October 16, 2009 at 3:07 am

    If i delete it, it goes away, I’ll try to re-download it and replace and see if it work, the site was working fine with no errors all i did was edit the limit-post.php file from

    Code:
    < ?php
    /*
    Plugin Name: Limit Posts
    Plugin URI: http://labitacora.net/comunBlog/limit-post.phps
    Description: Limits the displayed text length on the index page entries and generates a link to a page to read the full content if its bigger than the selected maximum length.
    Usage: the_content_limit($max_charaters, $more_link)
    Version: 1.1
    Author: Alfonso Sánchez-Paus Díaz y Julián Simón de Castro
    Author URI: http://labitacora.net/
    License: GPL
    Download URL: http://labitacora.net/comunBlog/limit-post.phps
    Make:
    In file index.php
    replace the_content()
    with the_content_limit(1000, "more")
    */

    function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>‘, ‘]]>’, $content);
    $content = strip_tags($content);

    if (strlen($_GET[‘p’]) > 0) {
    echo “

    “;
    echo $content;
    echo “

    “;
    }
    else if ((strlen($content)>$max_char) && ($espacio = strpos($content, ” “, $max_char ))) {
    $content = substr($content, 0, $espacio);
    $content = $content;
    echo “

    “;
    echo $content;
    echo “…”;
    echo “

    “;
    }
    else {
    echo “

    “;
    echo $content;
    echo “

    “;
    }
    }

    ?>

    I replaced all the

    Code:
    echo “
    “;

    with

    Code:
    echo “
    “;

    That way i would control them with css, is there a way i can edit that file and make it do that with out that error coming back lol…?

    # October 18, 2009 at 1:07 pm

    If the headers were already sent, it means you’ve outputted HTML before the PHP got to do some of its magic. (I’m sure there’s a better way to explain that… Experts, please step in!)

    Make sure the code you added is valid. If you used quotes within quotes, maybe try escaping them:

    Code:
    echo “This is a “quote” within a quote!”;

    Hope that helps! (It may not…)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".