craigstanfield
Forum Replies Created
-
Forum: Plugins
In reply to: [AMP] nav menu which overlays toggleHi @westonruter,
I’ve created a ticket in github as requested
https://github.com/ampproject/amp-wp/issues/2512
- This reply was modified 5 years, 9 months ago by craigstanfield.
Forum: Plugins
In reply to: [AMP] AMP homepage is not working.I’ve used yall (yet another lazy loader) with amp with no issues. You have to add a class of lazyload wherever its needed in non amp(ie any below fold images), you can even use it with css background picture video and other tags, that’s it and with amp the js doesn’t load and as it is a generic tag amp converts it.
Forum: Plugins
In reply to: [AMP] Images not displayed in amp version of postsOk I had a better look and it seems these images are lazyloaded, the js file handling this will be ignored by amp. I’m guessing this is not 1.1.x in transitional mode? theres a lot of differences between the original and amp pages, upgrading the plugin and putting it in transitional mode (middle option) this option allows amp pages to run using a ?amp suffix instead of amp but will fix most issues and use existing templates.
Forum: Reviews
In reply to: [AMP] AMP issues detected by Google search console@andrbarbieri Have you looked in the header file? I had this exact issue, turned out yoast was adding in one version the other was in the head section, I removed the one in the head section error gone…
Forum: Reviews
In reply to: [AMP] I am sick and tiredI’ve been using this plugin since a baby too and the latest version (1.1.x) is much easier to work with, I used to have to develop all the templates to be specific for amp (i used a folder in my theme called amp-templates) this was a nightmare to maintain but now i work within the same workflow for the rest of the site and no more templates to track all the time. I find that the menu is always broken (no surprise really as theres 100’s of different ways to do a menu) but a simple snippet in the functions file fixes this, all i had to do was grab the id of the container and button and find the class that the site usually uses when the menu is opened/closed and voila. All other content is dealt with with no or very little effort.
Between the use of the ‘test if page is amp and run this code otherwise that code’ and the menu fix you should be able to fix any issue i can think of. There are of course uses that are not what is normally expected but it is very easy to fix these by adding an amp script developed for this task (i’ve not had to since upgrading to 1.1.x but had a few i used in 0.7.2)
I’ve also used a few other AMP plugins but this one is by far the easiest most time saving and best supported of any AMP plugin I’ve tried
I’d highly suggest looking over this forum at similar issues you are having.
Forum: Plugins
In reply to: [AMP] Images not displayed in amp version of postsCould you try your local cache please (Ctrl + F5 or Cmd + R for mac), I’m seeing images on that page
Forum: Plugins
In reply to: [Complianz - GDPR/CCPA Cookie Consent] no href on anchor (SEO Error)Thanks Aert,
Look forward to the update of this great timesaving plugin!
thanks
Forum: Plugins
In reply to: [AMP] HAmburger not working with AMP v 1.1.0Thanks Pascal,
I’ll get that in place. I had noticed this page while looking over docs but was thinking I may be able to reuse my old template. However if it’s worth doing it’s worth doing right.
thanks
Forum: Fixing WordPress
In reply to: Issues with logging in to admin panelThanks aspenpc, saved my life, after getting a copy of the live site into my dev copy i got this in the backend. disabling plugins themes etc as from codex didn’t resolve this issue but renaming folder manually replacing wordpress and logging in and finally renaming plugins folder back (after deleting fresh copy) worked for me.
Hi wfalaa,
Yes this script is being shown in the live traffic log. I found that adding the server ip we progressed further but it wasn’t until i changed the number of tries until throttle that i was able to get the data in. With this in mind I would need a method either to adjust these values for the small time this runs and set them back afterwards or to disable it temporarily, the job itself runs from a cron so having an operative log on at a quiet time to change settings and press buttons is far from ideal.
Forum: Plugins
In reply to: [Contact Form 7] Submenu SelectHi lenglemetz,
to do this you will need to create a custom type in a function/plugin file
add_action( ‘wpcf7_init’, ‘wpcf7_add_shortcode_drop’ );
then create a function which creates the shortcode
**
* Add cf7 shortcode builder callup function
*/
function wpcf7_add_shortcode_drop() {
wpcf7_add_shortcode( ‘drop’, ‘wpcf7_drop_shortcode_handler’, true );
}finally you can create the function which generates the dropdown in html
function wpcf7_hide_shortcode_handler( $tag ) {
$tag = new WPCF7_Shortcode( $tag );
$id = get_the_ID();
$location = get_the_title();
$html = ‘<select required=”required” class=”form-control form-select required” id=”edit-submitted-besoin” name=”submitted[besoin]”>
<option value=”” selected=”selected”>– Choisir –</option>
<optgroup label=”Assurances de personnes”>
<option value=”Mutuelle sante”>Mutuelle santé</option>
<option value=”Prevoyance”>Prévoyance</option>
<option value=”Dependance”>Dépendance</option>
<option value=”Obseques”>Obsèques</option>
<option value=”Assurance Vie”>Assurance Vie</option>
</optgroup>
…
</select>’;return $html;
}this should help get you going, I cut and pasted part of the menu you wish to recreate, obviously you will need to get this data dynamically.
Forum: Plugins
In reply to: [Contact Form 7] change form values after submissionshould point out we used
$submission = WPCF7_Submission::get_instance();
$wpcf7_data = $submission->get_posted_data();and used this but found no function to set_posted_data() so used $_POST is there a method to set the posted data?
Forum: Plugins
In reply to: [Contact Form 7] api call and invalidate wpcf7Hi ageibert,
I’ve used the wpcf7_validate_api for this, first create a filter:
add_filter(‘wpcf7_validate_api’, ‘validate_api’, 20, 2);
now in this block you can get the values using:$submission = WPCF7_Submission::get_instance();
$wpcf7_data = $submission->get_posted_data();you can then call you’re api (presumably with curl) and invalidate as follows (presume $success is from the api call)
if (!$success) {
$result->invalidate($tag, ‘api call_failed (statuscode:’ . $statuscode . ‘).’ . $statusdesc[0]);
}and finally
return $result
hope this helps
Forum: Plugins
In reply to: [Contact Form 7] invalidate after api callThanks Takayuki, after revisiting the link i worked out how to add a custom type of api which fixed my issue
Forum: Plugins
In reply to: [Contact Form 7] invalidate after api callHi Takayuki,
Ok interesting, but i wish to call the api after the form has been validated, that way the data is ok to begin with, mainly the api will fail if the site is down which means data is not backed up.
Using the method on the link you supplied i was able to invalidate the form and show the api result beneath the email field, in my case there is no field for the api. I tried to create a custom type called api but hit issues, i also tried with submit validation which executed but failed to invalidate the form.
So is there any way i can validate the form fields as normal but then if the data sent to the api fails we invalidate the form.