رفتن به مطلب

مشکل کد افزودن ابزار در footer قالب


پست های پیشنهاد شده

سلام دوستان

کد زیر رو در functions اضافه می کنم ارو میده


if($theme->display('footer_widgets')) {
register_sidebar(array(
'name' => 'Footer Widget Area 1',
'id' => 'footer_1',
'description' => 'The footer #1 widget area',
'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
'after_widget' => '</li></ul>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>'
));

functions.php

لینک به ارسال

شرط ابتدایی رو حذف و تست کنید


register_sidebar(array(
'name' => 'Footer Widget Area 1',
'id' => 'footer_1',
'description' => 'The footer #1 widget area',
'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
'after_widget' => '</li></ul>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>'
));

  • امتیاز 2
لینک به ارسال

ممنون آقا پارسا

ابزار ها به خوبی در ابزارک ها قالب اضافه شدن ولی در قالب به نمایش در نمیان

لینک به ارسال

برای نمایش باید فراخوانی بشه


<?php
if( is_active_sidebar( 'footer_1' ) )
dynamic_sidebar( 'footer_1' );
?>

  • امتیاز 2
لینک به ارسال

کد فراخوانی رو به footer قالب اضافه کردم اما ابزارها در قالب به درستی نشان داده نمیشن

تصویری از footer قالب

footer.php

لینک به ارسال


<?php global $theme; ?>
</div>
<div id="footer-container">

<div id="footer">

<div id="copyrights">
<?php
if($theme->display('footer_custom_text')) {
$theme->option('footer_custom_text');
} else {
?> © <?php echo date('Y'); ?> <a href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a><?php
}
?>
</div>

<?php /*
All links in the footer should remain intact.
These links are all family friendly and will not hurt your site in any way.
Warning! Your site may stop working if these links are edited or deleted

You can buy this theme without footer links online at http://fthemes.com/buy/?theme=creatica
*/ ?>

<div id="credits">Powered by <a href="http://wordpress.org/"><strong>WordPress</strong></a> | Designed by: <a href="http://suv.reviewitonline.net/">Best SUV</a> | Thanks to <a href="http://suv.reviewitonline.net/toyota-suv/">Toyota SUV</a>, <a href="http://suv.reviewitonline.net/ford-suv/">Ford SUV</a> and <a href="http://trucks.reviewitonline.net">Best Truck</a></div><!-- #credits -->

</div><!-- #footer -->
<?php
if( is_active_sidebar( 'footer_1' ) )
dynamic_sidebar( 'footer_1' );
?>
</div>
<?php
if( is_active_sidebar( 'footer_2' ) )
dynamic_sidebar( 'footer_2' );
?>
</div>
<?php
if( is_active_sidebar( 'footer_3' ) )
dynamic_sidebar( 'footer_3' );
?>
</div>
<?php
if( is_active_sidebar( 'footer_4' ) )
dynamic_sidebar( 'footer_4' );
?>
</div>

</div><!-- #container -->
<?php wp_footer(); ?>
<?php $theme->hook('html_after'); ?>
</body>
</html>

کد درسته

باقی مسائل برمیگرده به استایل سایدبار

در کد رجیستر هم کلاس widget-container داده شده است

که باید تغییر و کلاس و استایل خاصی داده شود

  • امتیاز 3
لینک به ارسال

لطفا برای ارسال دیدگاه وارد شوید

شما بعد از اینکه وارد حساب کاربری خود شدید می توانید دیدگاهی ارسال کنید



ورود به حساب کاربری
×
×
  • اضافه کردن...