Viewing 8 replies - 1 through 8 (of 8 total)
  • Wait but what does this mean?

    function add_custom_sections ( $my_sections_args = array(
            'ids'                   => array( 1 , 45 , 47 ),
            'blur'                  => 0,
            'background'    => array( 1 => "randcolors", 45 => 'thumb' , 47 => 'randimages' ),//'randcolors'
            'context'               => 'home',
            'hook'                  => '__before_main_wrapper',
            'apply_shadow'  => false,
            'layout'                => 'boxed',
    );
    add_custom_sections ( $my_sections_args ); ) {

    Look,
    just use the code you see here under “The Code”

    then add also this:

    $my_sections_args = array(
     'ids' => array( 1 , 45 , 47 ),
     'blur' => 0,
     'background' => array( 1 => "randcolors", 45 => 'thumb' , 47 => 'randimages' ),//'randcolors'
     'context' => 'home',
     'hook' => '__before_main_wrapper',
     'apply_shadow' => false,
     'layout' => 'boxed',
    );
    add_custom_sections ( $my_sections_args );

    And customize the array $my_section_args
    Which is what that snippet says.

    Thread Starter Barry

    (@barryv)

    Still can/t get it right, thanks:
    Parse error: syntax error, unexpected ‘}’ in D:\Hosting\10113743\html\test\wp-content\themes\perfection1\functions.php on line 93

    <script src="https://pastebin.com/embed_js.php?i=ZLNBLXYB"></script>

    Look just copied your code https://pastebin.com/ZLNBLXYB (btw this was the link you had to put here) in my child-theme functions.php
    and works without problems.
    Is this the only code you have in your child-theme functions.php?

    Thread Starter Barry

    (@barryv)

    That’s the only code in functions.php of my child theme.

    @barryv
    your child-theme functions.php must start with

    <?php

    In that snippet, under “The Code” there’s a link “(learn more about how to customize the Customizr WordPress theme here)” which brings you here:
    https://doc.themesandco.com/customizr/customize-customizr-wordpress-theme/
    where you can see:
    What does a child-theme’s functions.php look like?
    Cheers.
    p.s.
    Could you mark this topic as resolved once you added that starting <?php
    thanks ??

    Thread Starter Barry

    (@barryv)

    Thanks a lot, you’re a life saver. It looks like there’s a lot more homework to do!

    Not really ??
    Now that you have your child-theme functions.php you can easily enjoy the theme and the snippets ??
    Have a great day barryv

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘add sections to customizr’ is closed to new replies.