Jump to content


Photo

Footer.Php No Wordpress


  • Faça o login para participar
2 replies to this topic

#1 Vinícius Harlock

Vinícius Harlock

    Novato no fórum

  • Usuários
  • 7 posts
  • Sexo:Não informado

Posted 07/01/2010, 22:38

Uso um tema no wordpress que possui um sidebar no rodapé. Mas ele não aparece. O que tá acontecendo?

Esse é o footer.php. Eu coloquei <?php get_footer(); ?> no local apropriado nos arquivos page.php, index.php, single.php, search.php (página "Resultados da pesquisa ")
<!-- Footer Starts -->
	<div id="footer-wrap">
	<div id="footer">
	
	<?php if ( ( function_exists('dynamic_sidebar') && (is_active_sidebar(3) || is_active_sidebar(4) || is_active_sidebar(5)) ) ) : ?>
		
		<!-- Footer Widget Area Starts -->
		<div class="footer-widgets">
		
			<div class="block">
				<?php dynamic_sidebar(3); ?>       
			</div>
			
			<div class="block">
				<?php dynamic_sidebar(4); ?>		           
			</div>
			
			<div class="block last">
				<?php dynamic_sidebar(5); ?>		           
			</div>
		
		</div>
		<!-- Footer Widget Area Ends -->
		
		<div class="fix"></div>
		
	<?php endif; ?>
		
		<div id="credits">
			
			<div id="copyright" class="col-left">
				<p>&copy; <?php echo date('Y'); ?> <?php bloginfo(); ?>. <?php _e('<a href="http://www.uniq-themes.ru">All Rights Reserved.</a>', 'freethemes') ?></p>
			</div>
			
			<div id="credit" class="col-right">
				<p><?php _e('Powered by', 'freethemes') ?> <a href="http://www.wordpress.org">Wordpress</a>. <?php _e('Designed by', 'freethemes') ?> <a href="http://www.freethemes.com"><img src="<?php bloginfo('template_directory'); ?>/images/freethemes.png" width="87" height="21" alt="free Themes" /></a></p>
			</div>
			
		</div>
		
	</div>
	</div>
	<!-- Footer Ends -->
	
</div><!-- /#container -->
<?php wp_footer(); ?>
<?php if ( get_option('free_google_analytics') <> "" ) { echo stripslashes(get_option('free_google_analytics')); } ?>
</body>
</html>

O style.css tá assim:
/* 2.6 Footer */
#footer{ background:#828282; color:#cacaca; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; font-size:11px;padding: 25px 0;border-top: 1px solid #b3b3b3;}
#footer a { color:#cacaca; }
#footer a:hover { border-bottom:1px dotted; }
#footer #credit img{vertical-align:middle; }
#footer #credit span{display:none;}

/* 2.6.1 Footer Widget Area */
#footer-widgets{ position:relative; background:url(images/bevel-footer-widgets.png) repeat-x top; background-color:#c1c0c0; border-bottom:1px solid #7b7b7b; }
#footer-widgets .container { background:url(images/bg-footer-widgets.png) no-repeat center 2px; padding:30px 0 10px; }
#footer-widgets .block { width:300px; float:left; margin:0 30px 0px 0; }
#footer-widgets .block.last { margin-right:0;; }
#footer-widgets .widget h3  { background:url(images/bg-footer-widget-title.png) repeat-x; text-shadow: #fff 0px 1px 0px;}

E finalmente o meu functions.php
<?php

//Start Theme Functions - Please refrain from editing this file.

$functions_path = TEMPLATEPATH . '/functions/';
$includes_path = TEMPLATEPATH . '/includes/';

(... cortei essa parte ... )

// Widgets  & Sidebars
require_once ($includes_path . 'sidebar-init.php');

require_once ($includes_path . 'theme-widgets.php');


add_action('wp_head', 'freethemes_wp_head');
add_action('admin_menu', 'freethemes_add_admin');
add_action('admin_head', 'freethemes_admin_head');    

?>

Pelo o que eu entendi, as funções responsáveis devem estar em sidebar-init.php na pasta /includes/, então aqui vai ele:
<?php

// Register widgetized areas

function the_widgets_init() {
    if ( !function_exists('register_sidebars') )
        return;

    register_sidebar(array('name' => 'Sidebar Top','id' => 'sidebar-top','before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>'));
    register_sidebar(array('name' => 'Sidebar','id' => 'sidebar-1','before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>'));
    register_sidebar(array('name' => 'Footer 1','id' => 'footer-1','before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>'));
    register_sidebar(array('name' => 'Footer 2','id' => 'footer-2','before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>'));
    register_sidebar(array('name' => 'Footer 3','id' => 'footer-3','before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>'));
}

add_action( 'init', 'the_widgets_init' );


    
?>


O que está errado então?

Edit-------------------------------------------

Ah! Eu consegui! Eu sou mesmo burro:

No footer.php deveria acrescentar

<div id="footer-widgets">
<div class="container col-full">
<?php if ( ( function_exists('dynamic_sidebar') && (is_active_sidebar('footer-1') || is_active_sidebar('footer-2') || is_active_sidebar('footer-3')) ) ) : ?>

<!-- Footer Widget Area Starts -->
<div class="footer-widgets">

<div class="block">
<?php dynamic_sidebar('footer-1'); ?>
</div>

<div class="block">
<?php dynamic_sidebar('footer-2'); ?>
</div>

<div class="block last">
<?php dynamic_sidebar('footer-3'); ?>
</div>

</div>
<!-- Footer Widget Area Ends -->

<div class="fix"></div>

<?php endif; ?>
<div class="fix"/>
</div>
</div>


E no style.css

.fix {
clear:both;
height:1px;
margin:-1px 0 0;
overflow:hidden;
}


Edição feita por: Vinícius Harlock, 07/01/2010, 22:38.


#2 Kadu DG

Kadu DG

    I Love my Little Girl! http://www.kdsg.net

  • Usuários
  • 597 posts
  • Sexo:Masculino
  • Localidade:Carapicuiba, SP

Posted 16/01/2010, 13:10

pelo o que eu entendi, essa sidebar é um widget, certo?

o seu tema suporta widgets?
Posted Image

#3 Fageleappy

Fageleappy

    Novato no fórum

  • Usuários
  • 2 posts
  • Sexo:Não informado
  • Localidade:ÿþC

Posted 22/08/2011, 17:14

Hello gals, - for some of you who thow away a few greens to win thousands: here is a cool casino site that accepts Canadian players and gives away 100% money back casino bonus and 20$ free casino bonus to every new player. They also offer blackjack, video poker, slot machines, roulette & other 300+ internet casino games playable.
Last Saturday I got almost one grand there, and the cashout was hassle-free and quick. Highly recommended:
<a rel="nofollow" href="http://blackjackto.c...asinos/">player casino</a>




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq