Add widget area
-
Hello I wish to add a widget area to the right of my site, how do I do that?
deskmagick.com
-
Hello @grassfedjeremy,
you have to register the sidebar area first, reference link can be: https://codex.wordpress.org/Function_Reference/register_sidebar– After that, make a page called ‘sidebar-right.php’ where call a function
<?php dynamic_sidebar('sidebar-id');?>. Now, drag the widgets in the sidebar made above at the backend.– Lastly, call
<?php get_sidebar('right');?>in the section where you need the sidebar.Note: put actual sidebar-id of the sidebar created above in the function dynamic_sidebar.
Hope that helps!
Thanks!
How do you open sidebar.php?
Call a function, what is call?
Drag widgets made above backend? How do I navigate to that page to do that?
Thank you!
sidebar-right.php
: You have to create a page whose name would be ‘sidebar-right.php’ inside your theme folder.
Call a function
: Means you have to paste those functions that i have mentioned in above reply in the appropriate place as mentioned above.
Drag widgets
: Go to your WordPress back-end, after that mouse over on ‘Appearance’ at left and click on ‘Widgets’. There you will see the sidebar area that you have created as i have described above.
Please follow the above steps carefully and you will get succeed.
Thanks!Alright, got it, what about my style css? How do I place it left of my main post? I do not want it to be attached to the main content body
The topic ‘Add widget area’ is closed to new replies.