• I’m trying to make a photo blog with post list where one post feed shows only the first image and the text in their own divs. I found this:

    https://www.wprecipes.com/how-to-get-the-first-image-from-the-post-and-display-it

    which first seemed to do it, though I couldn’t find a way to parse the text.
    So this function works when I view the blog itself, but the problem is that the function.php seem to mess up the admin side. Firstly it messes up the umlauts: P?¤iv?¤m?¤?¤r?¤. That’s not bad but I can’t publish anything! I get the error messages like this:

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:7) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 897

    It does this no matter what is in the functions.php!? The one I tested with this warning message only had the <?php ?> tags. And pages itself don’t have any linkage to the php. So it’s just the functions.php that messes everything up. The file permissions are 644. Is that ok?

    What I’m I doing wrong?
    Any idea how could I get the first image and the text separated in their own divs in the loop?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tomppalonen

    (@tomppalonen)

    functions.php, not Function.php

    Thread Starter tomppalonen

    (@tomppalonen)

    After uploading the functions.php (containing whatever) and trying to log in to the admin panels it just lists those warnings. For example:

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-login.php on line 354

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-login.php on line 366

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 720

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 721

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 722

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 723

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 724

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 725

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 728

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 729

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 730

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 731

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 734

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 735

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 736

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/samsarala.net/httpdocs/wp-content/themes/samsarala/functions.php:17) in /var/www/vhosts/samsarala.net/httpdocs/wp-includes/pluggable.php on line 737

    i agree. it is happening to me. if u found a solution please let me know. i think its a bug or something. thank you.

    let me know

    got it to work. it was a problem with my functions.php. i deleted all plugins. deleted everything in the functions.php and saved. then added back the plugins and add code into functions.php piece by piece.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Function.php mess up admin panels’ is closed to new replies.