UnlockTheMind
Forum Replies Created
-
I have made a basic attempt to reset the status/valid state of the form and the validation_error message on wpcf7_before_send_mail with no success. Any suggestions?
function wpcf7_do_something (&$WPCF7_ContactForm) { $WPCF7_ContactForm['status']='validation_failed'; $WPCF7_ContactForm['valid']=false; $WPCF7_ContactForm['response'] = 'User Exits'; return $WPCF7_ContactForm; } add_action("wpcf7_before_send_mail", "wpcf7_do_something");
Ah, I see that CF7 replaces the values when submitted.
resolved
Solution: Go to Site Stats as Administrator, click Site Stats “Configure” link and under Report visibility select the newly created role.
The server administrator was able to increase the varnish server’s timeout which allowed it to work.
My solution with the google tag manager code was to modify the google script slightly so that W3TC didn’t recognize a path to a .js file.
I changed this: j.src=’//www.googletagmanager.com/gtm.js?id=’+i+dl;
to this: j.src=’//www.googletagmanager.com/gtm.’+’js?id=’+i+dl;
And then W3TC doesn’t try and append it’s querystring right after the id= and mess up the GTM ID necessary to call the script for our account.
My solution with the google tag manager code was to modify the google script slightly so that W3TC didn’t recognize a path to a .js file.
I changed this:
j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;
to this:
j.src='//www.googletagmanager.com/gtm.'+'js?id='+i+dl;
And then W3TC doesn’t try and append it’s querystring right after the id= and mess up the GTM ID necessary to call the script for our account.
I have the same problem with Google Tag Manager as I describe here.
As long as W3TC keeps messing up the link to GTM I can’t activate mthe “Prevet caching of objects after settings change” feature, which I would very much like so that the CDN will update and pull a new file if a media library item is updated.
Anyone have any suggestions?
Forum: Themes and Templates
In reply to: Code in page template menuTurns out is was a Theme issue. A bug in the PageLines theme that is fixed in newer versions.
Forum: Plugins
In reply to: Reading header.php/footer.php to a text stringIn case anyone comes across this thread looking to do the same thing. I worked through an answer on stackoverflow
Basically create a page that contains just the header/footer and then read it usingfile_get_contents(get_bloginfo('wpurl').'/update/' )
where /update/ is the page with just the header/footer. Alternately you could usewp_remote_get()