• i edited functions.php and add some pagination code to it and press upgrade button then i found this error
    Parse error: syntax error, unexpected ‘clear’ (T_STRING), expecting ‘,’ or ‘;’ in /home4/raza/public_html/easytipstricks/wp-content/themes/goodnews47/functions.php on line 22
    please help me to solve this issue

Viewing 10 replies - 1 through 10 (of 10 total)
  • Can you show us the code you’ve inserted in functions.php?

    Thread Starter umairi

    (@umairi)

    i removed the code that time but still showing this error.actually i was searching about pagination code and i found then i inserted that code in functions.php and press the button ..then this error appeared.then i removed that code but still i m facing this issue

    Thread Starter umairi

    (@umairi)

    i cant accesss my dashboard and site page..

    Thread Starter umairi

    (@umairi)

    @bastetmilo i inserted this code for pagination at the end of the functions.php and found above mentioned error.and after geeting error i removed this code but issue is not resolved

    <?php
    function pagination($pages = ”, $range = 4)
    {
    $showitems = ($range * 2)+1;
    global $paged;
    if(empty($paged)) $paged = 1;
    if($pages == ”)
    {
    global $wp_query;
    $pages = $wp_query->max_num_pages;
    if(!$pages)
    {
    $pages = 1;
    }
    }
    if(1 != $pages)
    {
    echo “<div id=”clear”></div><div id=”xs-pagination”>”;
    if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo “« First“;
    if($paged > 1 && $showitems < $pages) echo “‹ Previous“;
    for ($i=1; $i <= $pages; $i++)
    {
    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    {
    echo ($paged == $i)? “<span class=”current”>”.$i.”</span>”:”“.$i.”“;
    }
    }
    if ($paged < $pages && $showitems < $pages) echo “Next ›“;
    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo “Last »“;
    echo “</div>n”;
    }
    }
    ?>

    You probably remove too much, or not every piece of code you’ve inserted earlier. Show line 22 of your code.

    @umairi please use pastebin.com or code tag here for code.

    You have error here:
    echo "<div id="clear"></div><div id="xs-pagination">";
    it should be like that:
    echo '<div id="clear"></div><div id="xs-pagination">';
    Use ‘ instead of “.

    Thread Starter umairi

    (@umairi)

    no i did not remove to much i removed only this code..and i cant access cntrol panel dashboard…can you tell me what is the problem with my site

    Thread Starter umairi

    (@umairi)

    @bastetmilo
    but i removed this code from the functions.php..but after removing this code i am still facing the same error

    @umairi did you cleared cache of your browser?

    And log into your ftp account and check your functions.php file if you really remove that code.

    Thread Starter umairi

    (@umairi)

    no i did not clear my browser cache..now i do…so i check this from ftp account on line 22

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Parse error: syntax error, unexpected 'clear' (T_STRING), expecting ',' or &#039’ is closed to new replies.