Ayuda con php
-
Amigos:
Traté de modificar el color de los links y al insertar el código me lanzó este error:
«Parse error: syntax error, unexpected ‘{‘ in /home/fernandapi/public_html/prueba/wp-content/themes/gridportfolio/functions.php on line 21»
Luego borré el código insertado para dejarlo como estaba antes, pero no se ha restablecido y me sigue arrojando el error.
Les dejo el código, por favor ayuda que no se qué hacer.
<?php
if ( function_exists( ‘add_theme_support’ ) ) { // Added in 2.9
add_theme_support( ‘post-thumbnails’ );
add_image_size(‘featured-big’,335,338,true);
add_image_size(‘featured-medium’,284,176,true);
add_image_size(‘featured-small’,240,250,true);
add_image_size(‘featured-sidebar’,58,58,true);
add_image_size(‘featured-blog’,336,157,true);
}if ( function_exists(‘register_sidebar’) ) {
register_sidebar(array(
‘name’=>’Sidebar Top’,
‘before_widget’ => ‘<div class=»sidebar_box»>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3>’,
‘after_title’ => ‘</h3>’,
));
}function catch_that_image() {
global $post, $posts;
$first_img = »;
ob_start();
ob_end_clean();
$output = preg_match_all(‘/<img.+src=[\'»]([^\'»]+)[\'»].*>/i’, $post->post_content, $matches);
$first_img = $matches [1] [0];if(empty($first_img)){ //Defines a default image
$first_img = «/images/post_default.png»;
}
return $first_img;
}function kriesi_pagination($pages = », $range = 2)
{
$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 class=’pagination’>»;
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo «««;
if($paged > 1 && $showitems < $pages) echo «‹«;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 «›«;
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo «»«;
echo «</div>\n»;
}
}?>
Saludos
- El debate ‘Ayuda con php’ está cerrado a nuevas respuestas.