-
AuthorPosts
-
February 12, 2015 at 4:12 pm #205345
Hey,
my page is http://fourtylove.com
I added the code from: http://prntscr.com/64d2oc
to my wordpress site but nothing shows up.
I added it as plain html and javascript but nothing worked? 🙁
Any idea? Thanks a lot!February 13, 2015 at 1:20 pm #206030Hi there,
Thanks for writing in! Please remove the
<script></script>
tags from the code and add it via Appearance > Customize > Custom > Javascript.Let us know how this goes!
February 13, 2015 at 3:59 pm #206151Thanks but,
could you paste me the code without the <script>? If I remove the there is nothing left or do I get it wrong? 😀
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us9.list-manage.com","uuid":"e0b4c3e5a44263a65130b4d1f","lid":"fcedb42cf4"}) })</script>
February 14, 2015 at 4:02 pm #206733Hi there,
It’s looks like it’s required due to config. How about just adding it like this? Add this code at your child theme’s functions.php
add_action('wp_footer', 'my_custom_script', 20 ); function my_custom_script () { ?> <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us9.list-manage.com","uuid":"e0b4c3e5a44263a65130b4d1f","lid":"fcedb42cf4"}) })</script> <?php }
Cheers!
February 15, 2015 at 7:02 am #206961I tried it and it worked BUT the close button is not working – you are stuck to the pop up forever 🙁
February 16, 2015 at 2:57 am #207409Hi there,
Can you provide us with exact URL of page having mailchimp? I can’t find it.
Thanks.
February 16, 2015 at 10:13 am #207724hey,
you can’t click on anything else if the popup appears so I can’t leave it on the page.
Any suggestion how I can implement the popover only on one particular site? (I will just make a private test site and post it here then)February 16, 2015 at 1:53 pm #207911Hi Awecesar,
Thanks for writing in!
Regretfully, we cannot suggest anything while seeing the issue first hand. Would you mind activating the popover in your website so that we can take a closer look and provide you with a tailored response?
Thanks!
February 17, 2015 at 9:57 am #208577Hey, I found the problem – I already had some code in my functions.php that I got from another X-developer. I implemented it wrong.
Could you fuse these 2 codes to one?<?php // Featured Image // ============================================================================= // // Output featured image in an <a> tag on index pages and a <div> for single // posts and pages. // if ( ! function_exists( 'x_featured_image' ) ) : function x_featured_image( $cropped = '' ) { $stack = x_get_stack(); $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false; if ( has_post_thumbnail() ) { if ( $cropped == 'cropped' ) { if ( $fullwidth ) { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-cropped-fullwidth', NULL ); } else { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-cropped', NULL ); } } else { if ( $fullwidth ) { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-fullwidth', NULL ); } else { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack, NULL ); } } switch ( is_singular() ) { case true: printf( '<div class="entry-thumb">%s</div>', $thumb ); break; case false: if ( is_page_template( 'template-layout-portfolio.php' ) ) echo '<!--is_portfolio-->'; printf( '<a href="%1$s" class="entry-thumb" title="%2$s">%3$s</a>', esc_url( get_permalink() ), esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ), get_the_post_thumbnail( NULL, 'portfolio-thumb', NULL ) ); break; } } } endif; add_image_size( 'portfolio-thumb', 380, 222, true ); add_action('wp_footer', 'cache_test', 9999 ); function cache_test () { echo '<!--NO-CACHE-->'; }
add_action('wp_footer', 'my_custom_script', 20 ); function my_custom_script () { ?> <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us9.list-manage.com","uuid":"e0b4c3e5a44263a65130b4d1f","lid":"fcedb42cf4"}) })</script> <?php }
Thanks a lot!
February 17, 2015 at 11:38 pm #208972Hey There,
Just added the my_custom_script function at the bottom of the functions.php file
<?php // Featured Image // ============================================================================= // // Output featured image in an <a> tag on index pages and a <div> for single // posts and pages. // if ( ! function_exists( 'x_featured_image' ) ) : function x_featured_image( $cropped = '' ) { $stack = x_get_stack(); $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false; if ( has_post_thumbnail() ) { if ( $cropped == 'cropped' ) { if ( $fullwidth ) { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-cropped-fullwidth', NULL ); } else { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-cropped', NULL ); } } else { if ( $fullwidth ) { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-fullwidth', NULL ); } else { $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack, NULL ); } } switch ( is_singular() ) { case true: printf( '<div class="entry-thumb">%s</div>', $thumb ); break; case false: if ( is_page_template( 'template-layout-portfolio.php' ) ) echo '<!--is_portfolio-->'; printf( '<a href="%1$s" class="entry-thumb" title="%2$s">%3$s</a>', esc_url( get_permalink() ), esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ), get_the_post_thumbnail( NULL, 'portfolio-thumb', NULL ) ); break; } } } endif; add_image_size( 'portfolio-thumb', 380, 222, true ); add_action('wp_footer', 'cache_test', 9999 ); function cache_test () { echo '<!--NO-CACHE-->'; } add_action('wp_footer', 'my_custom_script', 20 ); function my_custom_script () { ?> <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us9.list-manage.com","uuid":"e0b4c3e5a44263a65130b4d1f","lid":"fcedb42cf4"}) })</script> <?php }
February 24, 2015 at 4:35 pm #214361Thanks! Works very well!
Just two more questions (again ;D):
#1 Can I exclude the script from specific sites?
#2 Can I delay the pop up?
Thanks!!
February 25, 2015 at 12:45 am #214618Hey there,
Those are technically possible however, it would require additional development which falls beyond the scope of our support. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://theme.co/x/member/custom-development/.
Thank you for understanding.
March 8, 2016 at 3:06 pm #829247Thank you for this!
Just adding that the delay is set by Mailchimp when you create the pop up 🙂
March 9, 2016 at 12:24 am #829807You’re welcome! 🙂
-
AuthorPosts