__( 'Menu' ),)); } add_action( 'init', 'register_my_menus' ); date_default_timezone_set("America/Santiago"); $meses=array("","enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"); $ahora=date('Y-m-d H:i:s'); function get_category_id($slug){ $category=get_category_by_slug($slug); return $category->term_id; } function extraerUrl($string,$return_always_array=FALSE) { $myarray = array(); if (preg_match_all('/]*)[\"\']?[^>]*>/i', $string, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { $myarray[] = $match[1]; } } if ($return_always_array === FALSE && count($myarray) == 1 ) $myarray = array_pop($myarray); return $myarray; } function remove_page_from_query_string($query_string){ if ( ! isset($query_string['name']) ) {$query_string['name'] = null;} if ($query_string['name'] == 'page' and isset($query_string['page'])) { unset($query_string['name']); // 'page' in the query_string looks like '/2', so i'm spliting it out list($delim, $page_index) = split('/', $query_string['page']); $query_string['paged'] = $page_index; } return $query_string; } // I will kill you if you remove this. I died two days for this line add_filter('request', 'remove_page_from_query_string'); // following are code adapted from Custom Post Type Category Pagination Fix by jdantzer function fix_category_pagination($qs){ if(isset($qs['category_name']) and isset($qs['paged'])){ $qs['post_type'] = get_post_types($args = array( 'public' => true, '_builtin' => false )); array_push($qs['post_type'],'post'); } return $qs; } add_filter('request', 'fix_category_pagination'); // necesitamos plantillas para categorías //Gets post cat slug and looks for single-[cat slug].php and applies it add_filter('single_template', create_function( '$the_template', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") ) return TEMPLATEPATH . "/single-{$cat->slug}.php"; } return $the_template;' ) ); ?>
Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE), expecting end of file in /usr/share/nginx/nm.cmm.uchile.cl/wp-content/themes/milenio/single.php on line 8