Deseja exibir barras laterais diferentes para determinados posts e páginas em seu site WordPress?
Na maioria das vezes, você deseja exibir a mesma barra lateral em todo o site ou blog. No entanto, às vezes pode ser necessário exibir conteúdo diferente da barra lateral em algumas de suas postagens e páginas.
Neste artigo, mostraremos a você como criar e exibir barras laterais diferentes para cada post e página no WordPress.
Quando você precisaria de barras laterais diferentes no WordPress?
Muitos temas do WordPress têm um local padrão na barra lateral onde você pode adicionar widgets e conteúdo úteis. Por exemplo, muitos sites adicionam uma barra de pesquisa à barra lateral ou mostram uma lista de publicações recentes.
Se o seu tema do WordPress tiver uma barra lateral, por padrão, ela terá a mesma aparência em todos os seus posts, páginas, categorias e páginas de arquivo.
No entanto, talvez você queira exibir widgets de barra lateral diferentes em determinados posts e páginas do WordPress.
Por exemplo, você pode mostrar um conteúdo diferente na barra lateral de suas postagens mais populares ou exibir anúncios mais relevantes para uma determinada página.
Você pode até usar formulários de contato diferentes, dependendo do conteúdo da página.
Dito isso, vamos ver como criar e exibir uma barra lateral diferente para cada post e página no WordPress. Basta usar os links rápidos abaixo para ir direto ao método que você deseja usar:
Método 1: Exibir barras laterais diferentes para cada postagem e página no WordPress (fácil)
Se o seu tema for compatível com widgets de barra lateral, você poderá criar facilmente várias barras laterais usando o Lightweight Sidebar Manager. Esse plugin de barra lateral personalizada permite que você crie quantas barras laterais quiser e as atribua a diferentes posts e páginas.
Você também pode adicioná-las a tipos de post personalizados ou atribuir uma barra lateral a todas as diferentes páginas ou posts que tenham uma categoria específica.
A primeira coisa que você precisa fazer é instalar e ativar o plug-in Lightweight Sidebar Manager. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.
Após a ativação, você precisa ir para Appearance ” Sidebars. Para criar a primeira barra lateral, clique no botão “Add New” (Adicionar novo).
Agora você pode digitar um título para a nova barra lateral do WordPress. Isso é apenas para sua referência, portanto, você pode usar o que quiser.
Feito isso, abra o menu suspenso “Sidebar To Replace” (Barra lateral a ser substituída) e escolha o local onde você deseja exibir a barra lateral. As opções que você vê podem variar dependendo do seu tema do WordPress.
Agora, você pode controlar onde a barra lateral aparece criando regras de inclusão ou exclusão.
Para criar uma regra de inclusão, basta abrir o menu suspenso “Exibir em” e escolher as páginas, os posts, os tipos de post personalizados ou as categorias em que você deseja usar a barra lateral.
Por exemplo, você pode adicionar a barra lateral a uma página específica, como a página de erro 404, o arquivo do autor ou a página do blog.
Outra opção é usar a barra lateral para uma página, publicação ou categoria específica, selecionando “Páginas/Publicações/Taxonomias específicas”.
Isso adiciona uma caixa onde você pode digitar a página, o post ou a categoria.
Para criar mais regras de inclusão, basta clicar no botão “Add Display” Rule (Adicionar regra de exibição).
Isso adiciona uma seção na qual é possível criar a nova regra de inclusão.
Se preferir, você pode criar regras de exclusão. Por exemplo, talvez você queira mostrar a barra lateral em todas as páginas, exceto na página inicial.
Você também pode combinar regras de inclusão e exclusão para controlar exatamente onde a barra lateral aparece em seu site WordPress.
Para criar uma regra de exclusão para o local da barra lateral, basta clicar no botão “Add Exclusion Rule” (Adicionar regra de exclusão).
Na nova seção “Do Not Display On” (Não exibir em), abra o menu suspenso e selecione a página ou publicação que não deve usar essa barra lateral.
Você também pode excluir a barra lateral de páginas do WordPress que tenham uma categoria específica, seguindo o mesmo processo descrito acima.
Depois de decidir onde a barra lateral aparecerá no seu blog do WordPress, talvez você queira mostrar conteúdo diferente para usuários diferentes.
Por exemplo, se você tiver um site de associação, poderá usar uma barra lateral diferente para os visitantes em comparação com os membros conectados.
Para fazer isso, abra o menu suspenso “Usuário” e escolha uma função no menu suspenso. Agora, somente as pessoas com essa função de usuário específica verão a barra lateral.
Por fim, talvez você queira digitar uma descrição opcional. Isso só aparecerá no painel do WordPress, portanto, é uma boa maneira de compartilhar informações com outros administradores ou usuários em um blog do WordPress com vários autores.
Se você for criar muitas barras laterais, também poderá usar esse campo para deixar anotações e lembretes úteis.
Quando estiver satisfeito com as informações inseridas, basta clicar em “Publicar”.
Feito isso, vá para Appearance ” Widgets. Agora você verá todas as áreas de widgets compatíveis com o seu tema por padrão, além da nova barra lateral que você criou na etapa anterior.
Agora você pode adicionar widgets à barra lateral, como em qualquer outra seção de widgets.
Para obter instruções passo a passo, consulte nosso guia sobre como adicionar e usar widgets do WordPress.
Quando você estiver satisfeito com a configuração da barra lateral, clique em “Update” (Atualizar).
Agora, se você visitar seu blog do WordPress, verá a nova barra lateral ativa.
Para criar mais barras laterais temáticas, basta repetir essas etapas.
Método 2: Criar uma barra lateral diferente com um plug-in do Page Builder (funciona com qualquer tema do WordPress)
Se o seu tema não tiver uma função de barra lateral, você ainda poderá criar barras laterais diferentes usando um plug-in de criação de páginas do tipo arrastar e soltar.
O SeedProd é o melhor e mais fácil plug-in de criação de páginas de destino para iniciantes no WordPress. Com esse plugin, você pode criar qualquer tipo de página personalizada sem escrever nenhum código.
Ele também tem dezenas de kits e modelos de sites profissionais que você pode editar e ajustar facilmente usando o construtor de arrastar e soltar.
Ao projetar uma página personalizada, você pode escolher um layout que tenha uma barra lateral.
Em seguida, basta localizar os blocos que deseja exibir nessa barra lateral e adicioná-los usando o recurso de arrastar e soltar.
O SeedProd tem todos os blocos e recursos que se espera de um poderoso construtor de páginas, como formulários de inscrição, perfis sociais, cronômetros de contagem regressiva, formulários de contato, botões, vários blocos de conteúdo e muito mais. Isso facilita a criação de barras laterais poderosas e exclusivas para seu blog do WordPress.
Para saber como usar o plug-in do construtor de páginas SeedProd em seu site, consulte nosso guia sobre como criar barras laterais, cabeçalhos ou rodapés personalizados para cada categoria do WordPress e como criar uma página personalizada no WordPress.
Saiba mais maneiras de personalizar sua barra lateral do WordPress
Deseja melhorar ainda mais sua barra lateral do WordPress e torná-la mais útil para seus usuários? Dê uma olhada nestes tutoriais do WordPress:
- Como adicionar ícones de mídia social em sua barra lateral do WordPress
- Como criar um widget de barra lateral flutuante e fixa no WordPress
- Como adicionar postagens em destaque na barra lateral do WordPress
- Como usar códigos de acesso em seus widgets da barra lateral do WordPress
- Como criar um menu de barra lateral dobrável no WordPress (a maneira mais fácil)
- Como adicionar um formulário de login em sua barra lateral do WordPress
- Como exibir fotos do Instagram no widget da barra lateral do WordPress
Esperamos que este artigo tenha ajudado você a aprender como adicionar barras laterais diferentes a cada post ou página no WordPress. Você também pode querer saber como criar um feed personalizado do Instagram no WordPress ou ver nossas escolhas de especialistas para os melhores temas de blocos para edição completa do site.
Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Jiří Vaněk says
I have a technical section on my blog, which is the majority, and I write technical articles on various topics. The minority part is private, where I write my own opinions on anything (politics, personal life, sports). In elementor, I created a different header and a different footer for both sections so that it was graphically separated. I just needed to finish another menu. I will try your instructions so that both the technical and personal sections have a completely different structure. Thank you very much for the instructions.
Ralph says
Wow! I never knew i could have different sidebars!
This is great feature for different categories for my use. Thank you for this guide i will definitely put it to good use!
WPBeginner Support says
You’re welcome, glad we could share how to set this up
Administrador
poonam says
thank you so much
WPBeginner Support says
You’re welcome
Administrador
Rashmi says
Thanks for sharing such an interesting article
WPBeginner Support says
You’re welcome!
Administrador
Rajat says
thankyou for sharing this information
WPBeginner Support says
You’re welcome!
Administrador
Folake Taylor says
Unfortunately, this plug-in did not work with my version of WP.
WPBeginner Support says
Thank you for letting us know. For the not tested message, we would recommend taking a look at our guide below for understanding why it is not always something you should be concerned about:
https://www.wpbeginner.com/opinion/should-you-install-plugins-not-tested-with-your-wordpress-version/
Administrador
Finn G says
can you use this to add sidebar images to both sides of the page and have different images on different pages?
thanks
WPBeginner Support says
You can use this to have a different image on different pages but for the sidebars of your site normally, it would depend on the specific theme you are using for if they have a second sidebar for the other site or if one would need to be added with a page builder or custom code.
Administrador
Muhammadd Farhan says
Wow, you just saved my day! looking for this solution and I got exactly what I need. Thank you for the post.
WPBeginner Support says
Glad our guide was helpful
Administrador
Jim Joshua Oba says
Hello! My Sidebar has disappeared. It was displaying before it got missing. However, i din’t change the theme.
The message reads “Your theme has 1 widgets area but this particular page doesn’t display it”.
WPBeginner Support says
You would need to reach out to your theme’s support for displaying the widgets properly on that page.
Administrador
Ken Mbesa says
This is exaaaaactly what I needed for my portfolio website.
Thanks WP Beginner. You guys are the best, always!
I have been a huge user of your resources for over three years now, and your website is one of my most opened bookmarks in all my browsers (in fact, it’s usually just open even when am not using it looking for WP info ;-)).
WPBeginner Support says
Glad our guides are helpful and continue to be helpful
Administrador
Polly says
Mine is a very basic website but this worked like a charm. Thank you
WPBeginner Support says
You’re welcome, glad our article was helpful
Administrador
M.IFTIKHAR says
Hi ! I have a problem in my wordpress website that the sidebar on shop page is not showing up but when i custimize the shop page it still show but not showing on default shop page .Please tell me why this is happening ?
WPBeginner Support says
You would want to start by reaching out to your theme’s support to see if this is a known issue with your theme and they should be able to assist.
Administrador
Peter P. says
We tried this plugin but it wasn’t really usable for many sidebars. We had a hundred posts where the sidebar should contain more information about each product. Already after 10 sidebars the system became slower and slower, until it finally became unbearable with 20 or 30 sidebars.
We then used a different, differently designed solution that didn’t require a sidebar.
WPBeginner Support says
Thank you for sharing your feedback about the plugin
Administrador
Poorya says
What happens to the posts/pages which have multiple categories selected?! or with several tags?
For example, I want a custom category for the news section and another for tourism, but what happens when a post appears on both of these categories?
WPBeginner Support says
You would need to check with the plugin for what would happen when a conflict like that happens. If you have multiple posts in different categories then you may want to take a look at how you have your categories themselves set up
Administrador
Marco Diversi says
hello, I am trying to find a solution to add embed code to the sidebar of a post.
what i would like to have is a plugin that allow you to add a html or txt widget to the side of one single post, I have spent some time trying to find this but can not find! I have a website where every post is a different location and it needs a different map each post.
WPBeginner Support says
You may need to look for another solution as your needs grow but for now you may want to take a look at: https://www.wpbeginner.com/plugins/how-to-show-or-hide-widgets-on-specific-wordpress-pages/
Administrador
Shivaja says
This is what I was looking for! Thanks for the video tutorial wpbeginner…
WPBeginner Support says
Glad you liked our guide and it was helpful
Administrador
BRENDAN says
This one seems dead Syed, plugin not updated in 2 years so likely missing a lot of integration since WordPress has undergone some major core upgrades over the last 12 months. Is there a more recent solution for sidebars?
WPBeginner Support says
Thank you for letting us know, we’ll certainly take a look at this article and possible alternatives
Administrador
Rushikesh says
Is it possible without any plugin, on Genesis framework? because I have purchased NEWS PRO Genesis Theme.
Nick says
Great article ! THanks
Katy says
Thank you so much! I have been driving myself mad trying to fix the sidebar then I found your video! Thankyoooou!!
aba charles says
Really nice and detailed tutorial you have here. But i don’t know why after following it my sidebars are still not appearing
Greg Svishchov says
Hi, great video! What about creating a separate sidebar for the HOME PAGE? Is that possible?
WPBeginner Support says
Yes you can create a separate sidebar for the homepage if you are using the static front page.
Administrador
Soumik Sadman Anwar says
Is there any way to show no sidebar on a certain page at all?
Remember, the other pages will have to show the sidebar.
becka says
Is there a way to change the sidebar on certain pages and have it removed entirely on others? Before I download and activate I would like to know if removing the sidebar completely and making the page width 100% as easy as making different sidebars for different pages
Linda says
Hello – I have a sidebar on my weekly blog page but when I click on read more, it takes me to the full page width and doesn’t show the sidebar. I have looked everywhere to try and do this. Can anyone help please?
Dr Jill SM says
I tried to use the easy side bar and it does not work! I want to put a side bar only on specific pages and this put it on ALL of them.
I had learned how to use the original appearance > widgets and had right side bar on certain pages. I just added a new page to my web site and got the side bar that I did NOT want. I tried to add a left side bar to ONLY my new page and could not do it. So I looked at this video and got the plug-in easy side bars and it does not add a left side bar to ONLY the new page nor does it help me remove the right side bar [done through appearance > widgets] from the new page. Not real helpful.
K.Mr says
Hi, I need small help that you could do. I’m planning to buy managed wordpress on godaddy. I write posts in two languages. 1 is supported by adsense and one is not. I would like to place ads on posts using this on supported only language posts. Can I do this ? Can i use this to place ads? Please could you tell me?
Kati K. says
Hi! Can I add more sidebars with this plugin? Do I have to replace my existing sidebars with these new sidebars? For example, I have now 3 optional sidebars and I would like to have more than that. Is that possible somehow? Thanks!
Jennifer L says
I installed this plugin and now my site doesn’t work at all!! How do I fix this, it is really important! Please advise.
Jennifer
WPBeginner Support says
Hi Jennifer,
You can manually delete the plugin using FTP. Connect to your website using FTP client and go to /wp-content/plugins/ folder inside it you will find easy-custom-sidebars folder. Delete it and then login to your WordPress site. You can reinstall the plugin again if you want to give it another try.
Administrador
Jahbless says
Sir my sidebars are appearing at the bottom of my blog and not the side why?
WPBeginner Support says
Hi Jahblees,
Please check plugin settings and make sure that you set your sidebar to replace the appropriate sidebar.
Administrador
Ale Goedrich says
Hello – I have the same problem. The only choices I get is to replace the Footer Widgets 1 – 4. There are no other choices. Any ideas? I’d like to add a sidebar to my products thats different from my blog sidebar. I am using Divi.
Thank you, Alex
Jason A. says
I needed a super quick fix, and this did the trick nicely. Thanks!
Claire C says
Useful! I definitely want the ability to change my sidebar at times – my theme provides up to 8 choices, including full width (ie. none) for my pages but only ‘on’ or ‘off’ for all posts. So my question is, specifically for each individual post, could I chose 1. to add a sidebar of my choosing or 2. to have no sidebar at all (ie. full width)? Thanks
WPBeginner Support says
Hi Claire,
Yes, you can do that.
Administrador
Iboro says
Thanks a lot. Your articles has been really helpful especially for me a major novice
Dave DeWitt says
Wow! This feature is something I’ve been wanting to do for a while. As usual, wpbeginner, makes it easy and fun! Thank you!!