[resolved] After adding a semicolon my theme's layout is disfigured (5 posts)

  1. sinaknows
    Posted 6 years ago #

    I need help and don't know if this is the proper spot to ask or if I should just go to yahoo answers or wherever. I have been seeking for help in google but gosh trying to word the problem the same way as someone else might have worded it is difficult and I'm getting no where. Anyway, I'm not much of an expert on coding, but I was trying to fix an error by placing a semicolon (;) after this line in the coding of the functions.php file:

    foreach ($comm as $t2n=>$t2v){

    When I added the semicolon it looked like this:

    foreach ($comm as $t2n=>$t2v);{

    After updating it and viewing the site it pretty much wiped out the configuration of the layout of the site. So, I went back in to remove the semicolon from the same line, updated, and refreshed the site. The site still looks disfigured, even after removing the semicolon that I should've never inserted in that line.

    Will someone help me fix this? Would a semicolon change something else in another file automatically? I mean I don't understand why the theme didn't snap back when I removed the semicolon.


  2. sinaknows
    Posted 6 years ago #

    Please view the site to know what I'm talking about: thelbs.com

  3. Samuel B

    Posted 6 years ago #

    seeing this error
    Warning: Invalid argument supplied for foreach() in /home/hsinaa/public_html/thelbs.com/wp-content/themes/263_zipfile/functions.php on line 575

    can't you upload a fresh/new functions.php from theme source?

  4. miocene22
    Posted 6 years ago #

    A semicolon does not belong after a conditional arguement in normal brackets.
    It should be just:

    foreach ($comm as $t2n=>$t2v)
    {code in here;}
  5. sinaknows
    Posted 6 years ago #

    Thanks for your two responses. I went into cpanel overrode the old functions.php file by uploaded the original functions.php file from the theme source and it still didn't work. I also deleted the functions.php (in cpanel) and uploaded a completely new functions.php file and it still didn't work. The disfigurement did happen until I placed that semicolon there, that's why I was wondering if it could've changed something else in some other file because that was the only change I did. I don't know.

Topic Closed

This topic has been closed to new replies.

About this Topic