• Hi,

    I am running WordPress on my own server and have made a number of modifications and am fairly well versed in HTML and CSS,but am getting a little stuck when it comes to solving this particular issue.

    Basically,I want to have the Menu Toggle Button which is native to to the Twenty Sixteem theme so it displays at all times at all screen resolutions and the menu is permanently collapsable,rather than just at certain screen sizes.

    I assume this is something to do with the media queries involved in calling the button.

    As ever,any help would be greatly appreciated.

Viewing 15 replies - 16 through 30 (of 89 total)
  • Thread Starter Wolfman1000

    (@wolfman1000)

    Thankyou soooooo much for your swift help with this by the way,its really cool of you.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Hmm can you show me your website

    Thread Starter Wolfman1000

    (@wolfman1000)

    Yep..no probs…

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You can edit your up to 25 – 35 mins by the way

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You have this bit of code inside your Child Theme functions.php file:

    function wpdocs_theme_name_scripts() {
        wp_enqueue_script( 'twentysixteen-child-script', get_stylesheet_directory_uri() . '/functions.js', array(), '1.0.0', true );
    }
    add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' )

    Replace it with this:

    function wpdocs_theme_name_scripts() {
        wp_enqueue_script( 'twentysixteen-child-script', get_stylesheet_directory_uri() . '/functions.js', array(), '1.0.0', true );
    
    	wp_localize_script( 'twentysixteen-script', 'screenReaderText', array(
    		'expand'   => __( 'expand child menu', 'twentysixteen' ),
    		'collapse' => __( 'collapse child menu', 'twentysixteen' ),
    	) )
    }
    add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );

    Updated

    Thread Starter Wolfman1000

    (@wolfman1000)

    That results in a syntax error….is it the curly brace above add_action (penultimate line)possibly?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I don’t see syntax errors in that code, what is the full message?

    Thread Starter Wolfman1000

    (@wolfman1000)

    Parse error: syntax error, unexpected ‘}’ in /homepages/37/d212414563/htdocs/nilsjohnson_website/home/wp-content/themes/mysixteen/functions.php on line 22

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you copy all of the code from your Child Theme functions.php file and paste it into a PasteBin page: https://pastebin.com

    Thread Starter Wolfman1000

    (@wolfman1000)

    Yes I can give that a shot…you’ve caught me off guard by the way,I really wasn’t expecting a response so soon.It usually takes about a week on here..so thanks again Andrew

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Likewise, the people who create threads usually take a week to respond too

    Thread Starter Wolfman1000

    (@wolfman1000)

    Never came across pastebin before..pretty cool!

    https://pastebin.com/A23wKPe6

    Thread Starter Wolfman1000

    (@wolfman1000)

    Ha!Yer…..well I dont have a lot else to do this evening…other than eat chocolate eggs at least

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oh, try replacing this line:

    'collapse' => __( 'collapse child menu', 'twentysixteen' ),

    With this:

    'collapse' => __( 'collapse child menu', 'twentysixteen' )

    Thread Starter Wolfman1000

    (@wolfman1000)

    Still error:

    Parse error: syntax error, unexpected ‘}’ in /homepages/37/d212414563/htdocs/nilsjohnson_website/home/wp-content/themes/mysixteen/functions.php on line 22

Viewing 15 replies - 16 through 30 (of 89 total)
  • The topic ‘Twenty Sixteen Theme- Having Menu button Permanent’ is closed to new replies.