Title: cpthomas1990's Replies | WordPress.org

---

# cpthomas1990

  [  ](https://wordpress.org/support/users/lechuck/)

 *   [Profile](https://wordpress.org/support/users/lechuck/)
 *   [Topics Started](https://wordpress.org/support/users/lechuck/topics/)
 *   [Replies Created](https://wordpress.org/support/users/lechuck/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/lechuck/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/lechuck/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/lechuck/engagements/)
 *   [Favorites](https://wordpress.org/support/users/lechuck/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Booking for Appointments and Events Calendar - Amelia] Issue with form autocomplete](https://wordpress.org/support/topic/issue-with-form-autocomplete/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years ago](https://wordpress.org/support/topic/issue-with-form-autocomplete/#post-15953148)
 * Hi,
 * Okay thanks for letting me know. I will have to wait until the sites goes live
   and the plugin is removed to be able to check then.
 * In the meantime, I don’t suppose your developers would have a JavaScript or JQuery
   solution to be able to disable the autocomplete text altogether?
 * Many thanks,
    Chris
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Booking for Appointments and Events Calendar - Amelia] Issue with form autocomplete](https://wordpress.org/support/topic/issue-with-form-autocomplete/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/issue-with-form-autocomplete/#post-15878243)
 * Hi,
 * Thank you for your response.
 * That makes sense regarding auto populating the form with WP user data.
 * For me though the website is not live yet so I am using a sharing link which 
   comes from a plugin ‘Temporary Login Without Password’ so the client can see 
   the site. In the background of course there is login data still there.
 * Ideally it would be good if there is some way of overriding the autocomplete 
   attribute and chancing all instances within Amelia forms to “off” on the input
   fields. If your development teams has any workarounds for this that would be 
   a great help.
 * I have also tried viewing the form in Incognito mode and the form is still being
   autocompleted.
 * Many thanks,
    Chris
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Override a plugin function or constant via a child theme’s functions.php](https://wordpress.org/support/topic/override-a-plugin-function-or-constant-via-a-child-themes-functions-php/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/override-a-plugin-function-or-constant-via-a-child-themes-functions-php/#post-15437376)
 * [@threadi](https://wordpress.org/support/users/threadi/) Thank for you taking
   a look. I will get in touch with the plugin developer as you originally mentioned.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Override a plugin function or constant via a child theme’s functions.php](https://wordpress.org/support/topic/override-a-plugin-function-or-constant-via-a-child-themes-functions-php/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/override-a-plugin-function-or-constant-via-a-child-themes-functions-php/#post-15436774)
 * [@bcworkz](https://wordpress.org/support/users/bcworkz/) [@threadi](https://wordpress.org/support/users/threadi/)
   Thank you for your responses. I have had a look and the only source code I can
   find for `wp_plugin_hook()` is as follows:
 *     ```
       **
        * Load a view, the cool way
        *
        * @param string $view the view name (e.g. 'admin/dashboard')
        * @return string
        */
       function wp_plugin_hook($view, $datas = array(), $return = false, $start_path) {
   
       	// We want return, so we must stock the buffer
       	if($return)
       		ob_start();
   
       	/*
       	 * We get our global variable and extract it to simulate a view variable system
       	 * For example, $wp_plugin_name_views_datas['var'] will become $var within this function and our view
       	 *
       	 */
       	$datas = (array)$datas;
   
       	if(!empty($datas)) {
   
       		extract($datas);
   
       	}
   
       	require(rtrim($start_path, '/') . '/' . ltrim($view, '/') . '.php');
   
       	// Get content of the buffer
       	if($return) {
   
       		$buffer = ob_get_contents();
   
       		// Bye bye buffer
       		ob_get_clean();
   
       		return $buffer;
   
       	}
   
       }
       ```
   
 * I have tried the below two hooks in my child theme’s functions.php file.
 * 1) Where I try and override `$view`:
 *     ```
       function ct_test( $view ) { 
       	$view = wp_plugin_hook($file, $view_datas, $return, get_stylesheet_directory() . 'custom-template-folder');
       	return $view;
       }
       add_filter( 'wp_plugin_hook', 'ct_test' );
       ```
   
 * 2: Where I try and override the `$custom_view_path`:
 *     ```
       function ct_test2( $custom_view_path ) { 
       	$custom_view_path = get_stylesheet_directory() . '/custom-template-folder/' . $file . '.php';
       	return $custom_view_path;
       }
       add_filter( 'wp_plugin_hook', 'ct_test2' );
       ```
   
 * Something is going wrong in the above as neither are working. Is there anything
   you can see which I may be doing wrong? Of course if it’s not possible I will
   admit defeat and have to get in touch with the plugin developers 😛
 * Thanks,
    Chris
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack - WP Security, Backup, Speed, & Growth] Jetpack adding inline CSS to slider](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/#post-15380954)
 * Just to follow up on this, using either of the below CSS rules fixed the issue
   for me. Tested on iPad and iPhone – the slider images now scale up and down no
   problem.
 *     ```
       ul.wp-block-jetpack-slideshow_swiper-wrapper[style],
       li.wp-block-jetpack-slideshow_slide {
           width: 100vw !important;
       }
   
       .wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_slide figure .wp-block-jetpack-slideshow_image {
           width: 100vw !important;
       }
       ```
   
 * Thanks,
    Chris
    -  This reply was modified 4 years, 6 months ago by [cpthomas1990](https://wordpress.org/support/users/lechuck/).
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Sydney] Mobile nav not closing for anchor links](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/#post-15363144)
 * Thanks [@kharisblank](https://wordpress.org/support/users/kharisblank/). I have
   marked this thread as resolved. 🙂
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Sydney] Mobile nav not closing for anchor links](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/#post-15360618)
 * Okay so I know where I’ve gone wrong now. I didn’t include jQuery as a dependancy
   when I enqueued my script.
 * I originally had:
 *     ```
       function msb_enqueue_scripts() {
       	wp_enqueue_script('msb_close_mobile_nav_links', get_stylesheet_directory_uri() . '/js/close-mobile-anchor-links.js' );
       }
       add_action( 'wp_enqueue_scripts', 'msb_enqueue_scripts' );
       ```
   
 * but it should have been:
 *     ```
       function msb_enqueue_scripts() {
       	wp_enqueue_script('msb_close_mobile_nav_links', get_stylesheet_directory_uri() . '/js/close-mobile-anchor-links.js', array( 'jquery' ), '3.6.0', true );
       }
       add_action( 'wp_enqueue_scripts', 'msb_enqueue_scripts' );
       ```
   
 * All working now 🙂
 * [@kharisblank](https://wordpress.org/support/users/kharisblank/) thank you for
   your help!
 * Chris
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Sydney] Mobile nav not closing for anchor links](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/#post-15360518)
 * Hi Kharis,
 * I can’t show the current site as it’s not live and also being developed locally
   but I have recreated the issue on a test subdomain.
 * [https://www.test.christhomasdesign.co.uk/](https://www.test.christhomasdesign.co.uk/)
 * The below script is loaded just before the closing </body> via the TC Custom 
   JavaScript plugin.
 *     ```
       (function($) {
           'use strict';
   
           if ( matchMedia( 'only screen and (max-width: 1024px)' ).matches ) {
               $('.menu li a').on('click', function(){
                   $('.sydney-offcanvas-menu').removeClass('toggled');
   
               });
           }
   
       })(jQuery);
       ```
   
 * So the script works when logged in to WordPress but not when logged out. I get
   the errors listed below when not logged in (which you should see as well). I 
   guess that might be why it is not functioning correctly?
 * Firefox: ‘Uncaught ReferenceError: jQuery is not defined’
    Chrome: ‘Uncaught 
   ReferenceError: jQuery is not defined’ Safari: ‘ReferenceError: Can’t find variable:
   jQuery’.’
 * Sorry if this is something really obvious I am quite new to coding.
 * Thanks,
    Chris
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Sydney] Mobile nav not closing for anchor links](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/mobile-nav-not-closing-for-anchor-links/#post-15358611)
 * Hi Kharis,
 * Thanks for this. I have tried your solution but it still doesn’t work for me 
   I’m afraid.
 * I have linked the below JS via wp_enqueue_scripts in my child theme’s functions.
   php
 * close-mobile-anchor-links.js:
 *     ```
       ( function( $ ) {
       	'use strict';
   
       	if ( matchMedia( 'screen and (min-width: 0px) and (max-width: 1024px)' ).matches ) {
       		$('.menu li a').on('click', function(){
       			$('.sydney-offcanvas-menu').removeClass('toggled');
   
       		} );
       	}
   
       }( jQuery ) );
       ```
   
 * functions.php:
 *     ```
       function msb_enqueue_scripts() {
       	wp_enqueue_script('msb_close_mobile_nav_links', get_stylesheet_directory_uri() . '/js/close-mobile-anchor-links.js');
       }
       add_action( 'wp_enqueue_scripts', 'msb_enqueue_scripts' );
       ```
   
 * I can’t show you the website as I am developing locally. Can you see anything
   wrong with my above code or perhaps there is another solution I could try?
 * Thanks,
    Chris
    -  This reply was modified 4 years, 7 months ago by [cpthomas1990](https://wordpress.org/support/users/lechuck/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack - WP Security, Backup, Speed, & Growth] Jetpack adding inline CSS to slider](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/)
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/#post-15358071)
 * Hi Michelle,
 * Thank you for your response. I will have to message you privately as the project
   is not live yet.
 * Thank you

Viewing 10 replies - 1 through 10 (of 10 total)