Hola gente, es tarde así que voy a resumir me hice un theme wordpress con la herramienta online cssez.com que quedo para el tujes (nada que ver a como se veia en la vista de diseño) pero en si eso se arregla desde los estilos css a si que no tengo problema. Donde si tengo problema es que el wp me tira que no tengo una sidebar definida y por ende no puedo agragar widgets. Yo de php ni j :-\ y aunque probe con un par de tutoriales no mejore nada (y por suerte tampoco empeore) el codigo. segun leí en varios lugares al principio del codigo tengo que escribir:
Código:
<?php if ( !function_exists(’dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
Aunque no se exactamente en donde y al final:
y ademas tengo que crear un archivo functions.php en el theme que contenga algo parecido a:
Código:
<?php
if ( function_exists(’register_sidebar’) )
register_sidebar(array(
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ‘<div class=”title”>’,
‘after_title’ => ‘</div>’,
));
?>
y cuando subo este archivo al servidor se crea un tremendo error al punto que no se visualiza el blog. Necesito ayuda please. El codigo de las dos sidebars es el sig:
Código:
<!-- First sidebar start -->
<div id="firstSide" class="sidebar">
<h4>Search</h4>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the year <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
<?php } ?>
<h4><?php _e('Pages'); ?></h4>
<ul><?php
$querystr = "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'page' ORDER BY $wpdb->posts.post_title ASC";
$pageposts = $wpdb->get_results($querystr, OBJECT);
?>
<?php if ($pageposts): ?>
<?php foreach ($pageposts as $post): ?>
<?php setup_postdata($post); ?>
<li><a class="tabs" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><span><?php the_title(); ?></span></a></li>
<?php endforeach; ?>
<?php else : ?>
Not Found
<?php endif; ?></ul>
<h4><?php _e('Categories'); ?></h4>
<ul>
<?php list_cats(); ?>
</ul>
<h4>Recent entries</h4>
<ul>
<?php get_archives('postbypost','10','html'); ?>
</ul>
</div>
<!-- First sidebar end -->
Código:
<!-- Second sidebar start -->
<div id="secondSide" class="sidebar">
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. -->
<h4><?php _e('Author'); ?></h4>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
<h4><?php _e('Archives'); ?></h4>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h4><?php _e('Meta'); ?></h4>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
<li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.'); ?>">WordPress</a></li>
<?php wp_meta(); ?>
</ul>
</div>
<!-- Second sidebar end -->