Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » WordPress »

No Funciona Ningun Slider - Error de Tema

Estas en el tema de No Funciona Ningun Slider - Error de Tema en el foro de WordPress en Foros del Web. Hola amigos, eh dise?ado un codigo base en mi pagina de Wordpress en lo que contiene 2 sidebars.. uno en el header y otro al ...
  #1 (permalink)  
Antiguo 03/06/2013, 20:32
 
Fecha de Ingreso: enero-2013
Mensajes: 38
Antigüedad: 11 años, 3 meses
Puntos: 0
Exclamación No Funciona Ningun Slider - Error de Tema

Hola amigos, eh dise?ado un codigo base en mi pagina de Wordpress en lo que contiene 2 sidebars.. uno en el header y otro al lado derecho.. lo que eh querido hacer es instalar un SLIDER.. pero ya los eh instalado TODOS los plugins!! y ninguno funciona para que el slider se mueva.. no se si le falta algun codigo a mi tema.. lo cual creo que si.. porque ya eh probado con otros temas y si funcionan
Si saben cual es el codigo para que funcionen podrian publicarlo porfavor.

este es mi functions.php
Código:


<?php
automatic_feed_links();

if ( !is_admin() ) {
   wp_deregister_script('jquery');
   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"), false);
   wp_enqueue_script('jquery');
}


function wd_load_script() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
    wp_register_script('tinycarousel', get_template_directory_uri() . '/js/jquery.tinycarousel.min.js', 'jquery');
    wp_register_script('custom', get_template_directory_uri() . '/js/custom.js', 'jquery');
 
    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'tinycarousel' );
    wp_enqueue_script( 'custom' );
}    
 
add_action('wp_enqueue_scripts', 'wd_load_script');


if ( function_exists('register_sidebar') ) {
	register_sidebar(array(
                 'name' => 'Sidebar',
    'before_widget' => '<li class="sidebox %2$s">',
    'after_widget' => '</li>',
		'before_title' => '<h3 class="sidetitl">',
		'after_title' => '</h3>',
	));

	
}


 if ( function_exists('register_sidebar') )
       register_sidebar(array(
	'name'=>'header_widget',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h3 class="widgettitle">',
        'after_title' => '</h3>',
  ));




//function to call first uploaded image in functions file
function main_image() {
$files = get_children('post_parent='.get_the_ID().'&post_type=attachment
&post_mime_type=image&order=desc');
  if($files) :
    $keys = array_reverse(array_keys($files));
    $j=0;
    $num = $keys[$j];
    $image=wp_get_attachment_image($num, 'large', true);
    $imagepieces = explode('"', $image);
    $imagepath = $imagepieces[1];
    $main=wp_get_attachment_url($num);
		$template=get_template_directory();
		$the_title=get_the_title();
    print "<img src='$main' alt='$the_title' class='frame' />";
  endif;
}






function postimage($size=medium,$num=1,$lighbox=1) {
	if ( $images = get_children(array(
		'post_parent' => get_the_ID(),
		'post_type' => 'attachment',
		'numberposts' => $num,
		'order' => 'ASC',
		'orderby' => 'ID',
		'post_mime_type' => 'image',)))
	{
		foreach( $images as $image ) {
			$attachmenturl=wp_get_attachment_url($image->ID);
			$attachmentimage=wp_get_attachment_image($image->ID, $size );
			$img_title = $image->post_title;
			$img_desc = $image->post_excerpt;
			if ($size != "full"){
				echo '<a href="'.$attachmenturl.'" rel="lightbox" title="'.$img_desc.'">'.$attachmentimage.'</a>'.$img_title.'';
			} else {
				echo '<img src="'.$attachmenturl.'">';
			}
		}
	} else {
		echo "No Image";
	}
}





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 = get_bloginfo('stylesheet_directory')."/images/default_icon.jpg";
}
return $first_img;
}












add_action('register_form', 'trw_mensaje_registro');
function trw_mensaje_registro() {
$html = '
<div style="margin:10px 0;border:1px solid #e5e5e5;padding:10px">
<p style="margin:5px 0;">
Gracias por Registrarte a nuestra web
</p>
</div>';
echo $html;
}










class CSS_Menu_Maker_Walker extends Walker {

  var $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' );
  
  function start_lvl( &$output, $depth = 0, $args = array() ) {
    $indent = str_repeat("\t", $depth);
    $output .= "\n$indent<ul>\n";
  }
  
  function end_lvl( &$output, $depth = 0, $args = array() ) {
    $indent = str_repeat("\t", $depth);
    $output .= "$indent</ul>\n";
  }
  
  function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
  
    global $wp_query;
    $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
    $class_names = $value = ''; 
    $classes = empty( $item->classes ) ? array() : (array) $item->classes;
    
    /* Add active class */
    if(in_array('current-menu-item', $classes)) {
      $classes[] = 'active';
      unset($classes['current-menu-item']);
    }
    
    /* Check for children */
    $children = get_posts(array('post_type' => 'nav_menu_item', 'nopaging' => true, 'numberposts' => 1, 'meta_key' => '_menu_item_menu_item_parent', 'meta_value' => $item->ID));
    if (!empty($children)) {
      $classes[] = 'has-sub';
    }
    
    $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
    $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
    
    $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
    $id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
    
    $output .= $indent . '<li' . $id . $value . $class_names .'>';
    
    $attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) .'"' : '';
    $attributes .= ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) .'"' : '';
    $attributes .= ! empty( $item->xfn )        ? ' rel="'    . esc_attr( $item->xfn        ) .'"' : '';
    $attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';
    
    $item_output = $args->before;
    $item_output .= '<a'. $attributes .'>';
    $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
    $item_output .= '</a>';
    $item_output .= $args->after;
    
    $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
  }
  
  function end_el( &$output, $item, $depth = 0, $args = array() ) {
    $output .= "</li>\n";
  }
}










































?>
  #2 (permalink)  
Antiguo 03/06/2013, 21:35
Avatar de ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años, 1 mes
Puntos: 1146
Respuesta: No Funciona Ningun Slider - Error de Tema

En el archivo header.php asegúrate de tener entre las etiquetas <head></head>
Código PHP:
Ver original
  1. <?php wp_head(); ?>

la mayoría de los plugins utilizar el archivo jquery que incluye wordpress, la linea que te menciono lo que hace es cargar jquery para que tus plugins funcionen correctamente.

De hecho wordpress obliga a los desarrolladores a que no incluyan su propia versión de jquery, mootools u otro si no que utilicen la versión que ya incluyen ellos.
  #3 (permalink)  
Antiguo 04/06/2013, 13:10
 
Fecha de Ingreso: enero-2013
Mensajes: 38
Antigüedad: 11 años, 3 meses
Puntos: 0
Exclamación Respuesta: No Funciona Ningun Slider - Error de Tema

Ya agrege el codigo que me diste y aun nada.. mira este es mi header.php

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
 <head profile="http://gmpg.org/xfn/11"> 
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php if (is_home () ) { echo bloginfo('name'); echo ' | '; bloginfo('description'); }
 elseif ( is_category() ) { single_cat_title(); echo ' | ' ; echo bloginfo('name'); }
 elseif (is_single() || is_page()) { single_post_title(); echo ' | ' ; echo bloginfo('name'); }
 else { wp_title(' | ',true); } ?></title>
<?php wp_head(); ?>
<script type='text/javascript'>
$(document).ready(function() {
	$("#menu ul").css({display: "none"});
	$("#menu li").hover(function(){
	$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(300);
	},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
	});
});
</script>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="stylesheet" type="text/css" media="all" href="http://paramorehonduras.celebwire.org/imag/prueba.css" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>


<body>




<center>




<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('header_widget') ) : ?>;
<?php endif; ?>



<div id="container">

<center>
<div id="cssmenu">


<?php 
wp_nav_menu(array(
  'menu' => 'Main Menu', 
  'container_id' => 'cssmenu', 
  'walker' => new CSS_Menu_Maker_Walker()
)); 
?>




</div>








</center>
  #4 (permalink)  
Antiguo 04/06/2013, 13:11
 
Fecha de Ingreso: enero-2013
Mensajes: 38
Antigüedad: 11 años, 3 meses
Puntos: 0
Respuesta: No Funciona Ningun Slider - Error de Tema

mita ya lo puse y nada :(
  #5 (permalink)  
Antiguo 04/06/2013, 16:51
Avatar de 23r9i0  
Fecha de Ingreso: noviembre-2008
Ubicación: Catalonia
Mensajes: 203
Antigüedad: 15 años, 5 meses
Puntos: 33
Respuesta: No Funciona Ningun Slider - Error de Tema

Hola
primero elimina todos esos espacios vacios.
Segundo pon
Código PHP:
Ver original
  1. <?php wp_head(); ?>
antes de
Código HTML:
Ver original
  1. </head>
en tu archivo header.php

Tercero tienes en tu functions la llamada a jquery repetida y con diferente version, decide cual quieres.
Cuarto Comprueba que el plugin no te carge de nuevo jquery

Etiquetas: blog, php, plugin, post, slider, tema
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:17.