1) Create Widget Area in Wordpress
Steps:
a) Create a New Widget area: Go to function.php and get the sidebars code and register your new widget using copy the code and paste and then change accordingly.
Example:
b) Add this code in theme where you create widget area.
c) Go to widgets and add drag text widget and drop in you new widget (mine is 'Main Sidebar2'). Add data that you want to add.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2) Cache Issue in wordpress when nothing is updated
When you are updating some code to you wordpress site and changes are not visible then it may be due the cache plugin.
To solve this problem go to public_html/wp_content/cache and clear the cache.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Steps:
a) Create a New Widget area: Go to function.php and get the sidebars code and register your new widget using copy the code and paste and then change accordingly.
Example:
register_sidebar(array(
'name'=> 'Right Sidebar',
'id' => 'right_sidebar',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
b) Add this code in theme where you create widget area.
<?php
if (!function_exists('dynamic_sidebar')|| !dynamic_sidebar('Right Sidebar')):
?>
[ do default stuff if no widgets ]
<?php endif; ?>
c) Go to widgets and add drag text widget and drop in you new widget (mine is 'Main Sidebar2'). Add data that you want to add.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2) Cache Issue in wordpress when nothing is updated
When you are updating some code to you wordpress site and changes are not visible then it may be due the cache plugin.
To solve this problem go to public_html/wp_content/cache and clear the cache.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
No comments:
Post a Comment