Title: Blocked pages are now changing page layout
Last modified: December 31, 2016

---

# Blocked pages are now changing page layout

 *  Resolved [Georges Bustos](https://wordpress.org/support/users/georges-bustos/)
 * (@georges-bustos)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/)
 * Hi,
 * I’m integrating WP-members in my website (using AVADA 5.0.1) and now for new 
   pages, when I blocked one, the layout of the page is ONLY correct when I’m logged
   in. If I’m not logged in, the content of the page is just a mess. Of course, 
   if I unblock the page, the layout of the page is correct.
    Is this problem known
   or which parameters should I look first?
 * Thanks very much for your help.
    Georges

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/#post-8619297)
 * This happens with some builder plugins when the builder puts structural elements(
   such as div wrappers for design) into WP’s main $content variable instead of 
   the template.
 * WP-Members works by emptying what is in the $content variable via the [the_content filter](https://developer.wordpress.org/reference/hooks/the_content/),
   which it can only assume to be content. When design elements are included in 
   that, they get dumped along with the content.
 * You can use the [wpmem_securify filter](http://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_securify/)
   to do additional work on the $content variable after it has passed through WP-
   Members’ do_securify() function. This can be used to add structural wrappers 
   of your theme that are being left out.
 * There’s an basic example of how to do this here:
    [https://gist.github.com/butlerblog/39780ad8af98b5209ec7](https://gist.github.com/butlerblog/39780ad8af98b5209ec7)
 *  [GerardL](https://wordpress.org/support/users/gerardl/)
 * (@gerardl)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/#post-8622136)
 * Hi Chad,
 * I have the same isue [https://wordpress.org/support/topic/css-blocked-pages/#post-8619304](https://wordpress.org/support/topic/css-blocked-pages/#post-8619304)
 * I see that I can add a div after $content is empty, but I don’t understand what
   to do with the add_wrappers.php in the example.
 * thanks, Gerard
    -  This reply was modified 9 years, 3 months ago by [GerardL](https://wordpress.org/support/users/gerardl/).
 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/#post-8635239)
 * You would need to look at what HTML markup your builder is adding within the 
   main $content variable. The simplest way to do it would be to compare the generated
   HTML (i.e. use “view source” in your browser, or even better, the inspector in
   your browser) of a blocked page when logged in and not logged in.
 * I would look at the logged out state first and look at what comes before the 
   content WP-Members is delivering. Essentially, what are the wrappers before the
   message “This content is restricted to site members. etc…” That will likely be
   a div wrapper with a class like “entry-content”.
 * Then compare with the logged in state where you see the page with all of the 
   markup that the builder is adding withing the $content variable (i.e. not in 
   the actual template). That’s what you need to add – it could be a single wrapper,
   it could be four or five. It depends on the builder being used and what kind 
   of layouts are applied. Because this is variable depending on what you’re using,
   unfortunately there is no magic answer of “copy this line and paste it here”.
 *  [GerardL](https://wordpress.org/support/users/gerardl/)
 * (@gerardl)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/#post-8641057)
 * Thanks again for your reply.
    That part I understood, I already found that a `
   <div class="custom-page-content">` was added. I can edit the example add_wrappers.
   php from github, but don’t know what to do with this file. I can ftp it to WP,
   but where? And how does WP know it is there. Has it to be included in any way?(
   I’m not very wellknown with php)
 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/#post-8656829)
 * There are a number of freely available articles on the plugin’s premium support
   site that describe how to use code snippets, adding them to the functions.php
   file or using a custom plugin file for customization.
 * [http://rocketgeek.com/category/basics/](http://rocketgeek.com/category/basics/)
 *  [GerardL](https://wordpress.org/support/users/gerardl/)
 * (@gerardl)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/#post-8659744)
 * Thanks again for your help!
 * Gerard

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Blocked pages are now changing page layout’ is closed to new replies.

 * ![](https://ps.w.org/wp-members/assets/icon-256x256.png?rev=1226414)
 * [WP-Members Membership Plugin](https://wordpress.org/plugins/wp-members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-members/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-members/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [GerardL](https://wordpress.org/support/users/gerardl/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/blocked-pages-are-now-changing-page-layout/#post-8659744)
 * Status: resolved