clickable toggle menu, help

Solution One, which is also the simplest, would be to postion the button over the text. Then you could click anywhere within the link to open the menu. This assumes you don’t actually ever want to go to the top level page. In you styles.css, add width: 100% !important; and text-align: right; to your .dropdown-toggle … Read more

Change image using only CSS [closed]

Instead of trying to change the URL of the img tag, use your media query to hide the image and change the :before of your <a>. Like this… @media screen and (max-width: 59.6875em) { .site-branding img { display:none; } .site-branding a::before { content: url(“https://www.example.com/example/wp-content/uploads/Logo_Wide_2x.png”); } }

using wp enqueue style to create a CSS file specifically for a page template

If “/styledtwentyfifteen” is your child directory then that’s included by get_stylesheet_directory_uri() (of which bloginfo(‘stylesheet_directory’) is an alias) so you should leave it out on registering: function register_more_stylesheets() { wp_register_style( ‘stylesheet_name’, get_stylesheet_directory_uri() . ‘/background-slider-template.css’ ); } Similarly with is_page_template() you only need the file name (relative to the template directory), and if you register a style … Read more

Twenty Fifteen: Change navigation menu behavior

In case anyone is interested, I think I managed to find a solution. Just had to add the following two lines of code just after the e.preventDefault(); line and before the _this.toggleClass( ‘toggle-on’ ); one: container.find( ‘.dropdown-toggle.toggle-on’ ).not( _this ).not( _this.parents( ‘.children, .sub-menu’ ).prev( ‘.dropdown-toggle’ ) ).removeClass( ‘toggle-on’ ).attr( ‘aria-expanded’, false ); container.find( ‘.children.toggled-on, .sub-menu.toggled-on’ … Read more

Twenty fifteen – Theme background customization

Twenty Fifteen has a hook for you to modify the custom background theme_support arguments (documentation for those arguments here): // Setup the WordPress core custom background feature. add_theme_support( ‘custom-background’, apply_filters( ‘twentyfifteen_custom_background_args’, array( ‘default-color’ => $default_color, ‘default-attachment’ => ‘fixed’, ) ) ); You can implement this filter in your child theme’s functions.php, e.g. function wpse_224240_custom_background_args($args) { … Read more