Site logo

Archived topic

Using Sections made right sidebar disappear

5 replies · Started by Robert on May 3, 2018

Viewing posts 1–6 of 6

I am trying to use sections to enable me to apply a colored background to selected paragraphs.
I want an effect similar to this page on non-WP website:
https://www.thinkglobalgreen.org/COAL.html
Scroll down and you will see the paragraph December 2015 has a gray background.

Here is the WP version of the page without any paragraph background coloring:
http://pow.qqp.mybluehost.me/bob/coal/

Here is another version of that page when I tried to use sections.
http://pow.qqp.mybluehost.me/bob/coal-bob/

I made a new page and enabled sections. In the first section I copied the content up to the paragraph I want to highlight. Next, in the section section I copied that one paragraph and applied gray background. Finally I made a third section and copied the remainder of the page.
When I view the page the content is there and the December 2015 paragraph has gray highlighting.

But the right sidebar disappeared!

How can I keep this from happening?

Hi there,

Sidebars are removed by default in sections as it's supposed to be a simple page builder.

You can use this filter: https://docs.generatepress.com/article/generate_sections_sidebars/

However the gray background paragraph can be achieved without using sections though.

You just need to create a div in the normal editor like this:

<div class="grey-background">
    Content with grey background here
</div>

Then target it with this CSS:

.grey-background {
    background-color: #000;
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Let me know.

I installed the Code Snippets plugin and added the PHP filter code, and it worked fine. Thank you.

Although the little CSS and using the normal editor would be straightforward, it's not a good fit for this project. The owner of the website who does all the work himself is not a tech person. I showed him the normal editor and HTML and it was overwhelming.

So the simple page builder you have in Sections seems like a good fit.

I have some feature recommendations to make for GeneratePress to accomodate website authors like my friend. How should I make recommendations? Simple create a new support post?

Yup a new support topic would be great!

I will do that! But I will carry on with my project more first! Thank you so much for your help.

No problem :)

This archived topic is closed to new replies.