Title: Adding sections to multiple pages
Last modified: August 30, 2016

---

# Adding sections to multiple pages

 *  [pecas](https://wordpress.org/support/users/pecas/)
 * (@pecas)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/adding-sections-to-multiple-pages/)
 * I’m trying to add sections to multiple pages in Customizr.
 * I followed the instructions in [this post](http://presscustomizr.com/snippet/adding-sections-to-any-page-or-posts-in-customizr/)
   and all works well for a single page.
 * In the comments of the above post, someone else had my same issue and Nicholas
   gave a suggestion that isn’t working for me at the moment.
 * Here is my code:
 *     ```
       $my_sections_args = array(
        'ids' => array( 3941, 3946, 3956, 3972 ),
        'blur' => false,
        'background' => array( 3941 => "#004692", 3946 => "#ffb96d", 3956 =>"#004692", 3972=> "#ffb96d" ),//'randcolors'
        'context' => '41',
        'hook' => '__before_main_wrapper',
        'apply_shadow' => false,
        'layout' => 'full',
       );
   
       $my_sections_tea = array(
        'ids' => array( 4026 ),
        'blur' => false,
        'background' => array( 4026 => "#004692"),//'randcolors'
        'context' => '27',
        'hook' => '__before_main_wrapper',
        'apply_shadow' => false,
        'layout' => 'full',
       );
   
       function apply_contextual_sections() {
       if ( is_page(41) ) {
       add_custom_sections ( $my_sections_args );
       } else if ( is_page(27) ) {
       add_custom_sections ( $my_sections_tea );
       }
       }
       add_action('template_redirect' , 'apply_contextual_sections' );
       ```
   
 * Please help!

Viewing 1 replies (of 1 total)

 *  Thread Starter [pecas](https://wordpress.org/support/users/pecas/)
 * (@pecas)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/adding-sections-to-multiple-pages/#post-6665641)
 * Nothing??

Viewing 1 replies (of 1 total)

The topic ‘Adding sections to multiple pages’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [pecas](https://wordpress.org/support/users/pecas/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/adding-sections-to-multiple-pages/#post-6665641)
 * Status: not resolved