cpthomas1990
Forum Replies Created
-
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,
ChrisHi,
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@threadi Thank for you taking a look. I will get in touch with the plugin developer as you originally mentioned.
@bcworkz @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,
ChrisJust 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, 3 months ago by cpthomas1990.
Forum: Themes and Templates
In reply to: [Sydney] Mobile nav not closing for anchor linksThanks @kharisblank. I have marked this thread as resolved. 🙂
Forum: Themes and Templates
In reply to: [Sydney] Mobile nav not closing for anchor linksOkay 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 thank you for your help!
Chris
Forum: Themes and Templates
In reply to: [Sydney] Mobile nav not closing for anchor linksHi 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/
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,
ChrisForum: Themes and Templates
In reply to: [Sydney] Mobile nav not closing for anchor linksHi 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, 3 months ago by cpthomas1990.
Hi Michelle,
Thank you for your response. I will have to message you privately as the project is not live yet.
Thank you