Problema al insertar Widget de Texto en Modern Notepad

Poyello Seguir

Épsilon
Redactor
Verificación en dos pasos desactivada
Verificado por Whatsapp
Desde
16 May 2009
Mensajes
957
Hola forobeteros, hoy vengo a molestarles con un problema que tengo con el tema Modern Notepad..

Resulta que a la hora de tratar de insertar el widget de Texto no puedo insertarlo, y lo que se me hace mas raro que en ves de que aparesca con el nombre de Texto me aparece con el nombre de text :S.

Para no hacercelas de emocion me vi a la tarea de crear un video para que vean lo que esta pasando :s.

[YOUTUBE]p8RRntYA8e0[/YOUTUBE]

Tambien les agrego el sidebar.php

PHP:
<div id="right-block">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
        <div class="box categories">
        	<div class="header">
	        	<h3><?php _e('Category:'); ?></h3>
	        </div>
        	<ul>
        	    <?php wp_list_cats('sort_column=name&hierarchical=1'); ?>
        	</ul>
        </div>

        <div class="box blogroll">
        	<div class="header">
	        	<h3><?php _e('Blogroll:'); ?></h3>
	        </div>
        	<ul>
        	    <?php get_links(-1, '<li>', '</li>', '', FALSE, 'name', FALSE, FALSE, -1, FALSE); ?>
        	</ul>
        </div>
        
        <div class="box archive">
        	<div class="header">
	        	<h3><?php _e('Archives:'); ?></h3>
	        </div>
        	<ul>
        	    <?php wp_get_archives('type=monthly'); ?>
        	</ul>
        </div>
        
        <div class="box popular">
        	<div class="header">
	        	<h3><?php _e('Meta:'); ?></h3>
	        </div>
        	<ul>
            	<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
            	<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></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>
            	<?php wp_meta(); ?>
        	</ul>
        </div>
	<?php endif; ?>
</div><!--#right-block-->

y el Fuctions.php
PHP:
<?php
if ( function_exists('register_sidebars') )
 register_sidebars(2,array(
        'before_widget' => '<div class="box">',
    'after_widget' => '</div>',
 'before_title' => '<div class="header"><h3>',
        'after_title' => '</h3></div>',
    ));

function widget_aoe_search() {
?>
    	<div class="box">
		    <div class="header"><h3>Search</h3></div>
            <div id="sidesearch">
			<form method="get" action="<?php bloginfo('url'); ?>/">
				<input type="text" value="" name="s" class="text" />
				<input type="submit" id="search-submit" class="button" value="Go!" />
			</form>
            </div>
            <div class="footer"></div>
		</div>
<?php
}

function widget_aoe_tag_cloud($a) {
    $options = get_option('widget_tag_cloud');    
    $title = empty($options['title']) ? __('Tags') : apply_filters('widget_title', $options['title']);
?>
	<div class="box">
	    <div class="header"><h3><?php echo $title ?></h3></div>
		<div class="tags">
			<?php wp_tag_cloud();?>
		</div>
        <div class="footer"></div>
	</div>
<?php
}
/*
<?php wp_text() ?>
*/

function widget_aoe_text($args, $widget_args = 1) {
	extract( $args, EXTR_SKIP );
	if ( is_numeric($widget_args) )
		$widget_args = array( 'number' => $widget_args );
	$widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) );
	extract( $widget_args, EXTR_SKIP );

	$options = get_option('widget_text');
	if ( !isset($options[$number]) )
		return;

	$title = apply_filters('widget_title', $options[$number]['title']);
	$text = apply_filters( 'widget_text', $options[$number]['text'] );
?>
        <div class="box">
		    <div class="header"><h3><?php if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?></h3></div>
			<div class="textwidget"><?php echo $text; ?></div>
            <div class="footer"></div>
		</div>
<?php
}


if ( function_exists('register_sidebar_widget') ) {
    register_sidebar_widget(__('Search'), 'widget_aoe_search');
}

if ( function_exists('register_sidebar_widget') ) {
    register_sidebar_widget(__('tag_cloud'), 'widget_aoe_tag_cloud');
}



if ( function_exists('register_sidebar_widget') ) {
    register_sidebar_widget(__('text'), 'widget_aoe_text');
 
Última edición:

danielmd

1
Eta
Programador
Verificación en dos pasos desactivada
Suscripción a IA
Desde
6 Abr 2009
Mensajes
1.288
No entiendo para que tienes lo mismo en en el slidebar y en el funtions.

Lo que puedes hacer es crear tu mismo editando el slidebar
PHP:
        <div class="box blogroll">
            <div class="header">
                <h3>Titulo texto</h3>
            </div>
          CONTENIDOO
        </div>


P.D. Tu video no lo puedo ver, youtube dice que tengo que ser tu amigo.. u_u<--_
 
Última edición:

Poyello

Épsilon
Redactor
Verificación en dos pasos desactivada
Verificado por Whatsapp
Desde
16 May 2009
Mensajes
957
No entiendo para que tienes lo mismo en en el slidebar y en el funtions.

Lo que puedes hacer es crear tu mismo editando el slidebar
PHP:
        <div class="box blogroll">
            <div class="header">
                <h3>Titulo texto</h3>
            </div>
          CONTENIDOO
        </div>

Sorry, Me habia equivocado en el codigo de funtions.php, y prefiero hacerlo mediante el widget ya qe para eso sirve, no me gusta hacerlo manual.

Nadie tiene ni tan siquiera una pista?
 

Cristhian

VIP
Eta
SEO
Verificación en dos pasos activada
Verificado por Whatsapp
Verificado por Binance
Suscripción a IA
Desde
6 Abr 2009
Mensajes
1.346
Estuve probando el theme y solucioné el problema, quitando estas lineas del functions.php:

<?php wp_text() ?>
*/

function widget_aoe_text($args, $widget_args = 1) {
extract( $args, EXTR_SKIP );
if ( is_numeric($widget_args) )
$widget_args = array( 'number' => $widget_args );
$widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) );
extract( $widget_args, EXTR_SKIP );

$options = get_option('widget_text');
if ( !isset($options[$number]) )
return;

$title = apply_filters('widget_title', $options[$number]['title']);
$text = apply_filters( 'widget_text', $options[$number]['text'] );
?>

Espero que te sirva friend ;)
 

Poyello

Épsilon
Redactor
Verificación en dos pasos desactivada
Verificado por Whatsapp
Desde
16 May 2009
Mensajes
957
Gracias cristhian me funciono a la perfeccion :D
 

¡Regístrate y comienza a ganar!

Beneficios

  • Gana dinero por participar
  • Gana dinero por recomendarnos
  • Descubre ofertas de empleo diariamente
  • Negocios seguros
  • ¡Información premium y más!

Acceder

¿Ya tienes una cuenta? Accede aquí

Arriba