• Hi

    I did post this in the Themes forum but someone suggested I would be better to post it here.

    I am trying to increase the number of slides I can have in the slider on the home page. Currently it is 4 and I want to increase it to 6. The files in question are:

    customizer.php
    header-functions.php

    It is a simple change in both files from:

    for( $i = 1; $i <= 4; $i++ )

    to:

    for( $i = 1; $i <= 6; $i++ )

    I have proved it works by making the change in the files in the parent theme, but obviously want to do it in the child theme so I don’t lose the changes.

    Depending on which Google search result I look at I seem to get conflicting advice. Some say just copy the PHP from the parent to the child, make the changes and it will work. I have tried this putting the PHP files in the root directory of the child theme, and also replicating the parent theme structure by putting them in a “inc” sub directory. Neither seemed to be read when I made the changes.

    I also got some results that said I needed to add a ‘require_once( get_stylesheet_directory() . ‘/xxx.php’ );’ statement to my child theme function.php, but when I do I always get an error when saving the file:

    Fatal error: Cannot redeclare accelerate_customize_register() (previously declared in /var/sites/o/onefishermansloft.co.uk/public_html/wp-content/themes/accelerate-child/customizer.php:10) in /var/sites/o/onefishermansloft.co.uk/public_html/wp-content/themes/accelerate/inc/customizer.php on line 630

    I am not a coder or php guru so at this point I am a bit stuck.

    Can anyone help?

    Thanks

    Ian

  • The topic ‘Increase number of slides in slider’ is closed to new replies.