-
AuthorPosts
-
October 29, 2015 at 1:01 am #644322
Hello,
I need to add my mailchimp newsletter archives within a page.. Mailchimp provided me with a code but when I put that code within the custom CSS of the page I want the newsletter archives in, it puts the archives on the top of the page rather then in the body of the page.
October 29, 2015 at 1:03 am #644323This reply has been marked as private.October 29, 2015 at 1:12 am #644333Hi there,
Thanks for writing in! You can use our Email Form Extensions and configure MailChimp Integration – https://community.theme.co/kb/extension-email-forms/
Regarding your question – You can use the CSS only (without script tag) within Customizer CSS and RAW JavaScript within the script box.
If you need to add the external JavaScript file, this requires a template change, I’d advise that you setup a Child Theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Add it into your Child Theme’s functions.php file.
function custom_external_js() { wp_enqueue_script('your-own-js', get_stylesheet_directory_uri() . 'http://us11.campaign-archive1.com/generate-js/?u=fb7ab3f06b4f70f53da5d2358&fid=2305&show=4', array('jquery')); } add_action('wp_enqueue_scripts', 'add_my_script');
Hope this helps.
Cheers!
October 29, 2015 at 10:06 pm #645678I;m not sure I understand. I have the mail-chimp plugin running. I have separated out the code on the newsletter archives page as follows-
In the custom CSS I put:
.display_archive {font-family: arial,verdana; font-size: 12px;}
.campaign {line-height: 125%; margin: 5px;}in the custom JS I put:
<script language=”javascript” src=”http://us11.campaign-archive1.com/generate-js/?u=fb7ab3f06b4f70f53da5d2358&fid=2305&show=4″ type=”text/javascript”></script>
and now I dont get the archives anywhere on the page.
I have a child theme running and I added the code that your recommended. but I got the following error:
” Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_my_script’ not found or invalid function name in /home/starwand/public_html/livetru.org/wp-includes/plugin.php on line 503″
October 29, 2015 at 10:12 pm #645689Update – The code you recommended has been re added to the functions.php in the child theme – there is no error now ( I was missing a piece of it) .. but I have not yet been able to figure out how to get the archives to show up
thank you
NataliaOctober 30, 2015 at 12:17 am #645823Hi Natalia,
Where do you want exactly the list to appear? You could place the script on a RAW content element.
<script language="javascript" src="http://us11.campaign-archive1.com/generate-js/?u=fb7ab3f06b4f70f53da5d2358&fid=2305&show=4" type="text/javascript"></script>
You would not see the list on the Cornerstone preview but it’ll show up on the front page.
Hope it helps, Cheers!
October 30, 2015 at 10:51 am #646415Thank you! that worked!
October 30, 2015 at 2:02 pm #646654You are most welcome 🙂 .
-
AuthorPosts