Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #570530

    Hello!

    What code should be added to the file function.php my child theme to display the subscription to the newsletter after each post?

    The documentation I have found a solution:

    function add_mc_after_post_content() {
    if (is_singular("post")){
    ?>
    <div class="av-sub-box">
    <h5 class='av-sub-box-title'>Suscribe to our Blog</h5>
    <?php echo do_shortcode("[mc4wp_form]"); ?>
    </div>
    <?php
    }
    }
    add_action('ava_after_content', 'add_mc_after_post_content');

    But I want to insert here this ALB shortcode without mailhimp plugin:

    [av_mailchimp list='XXXX' double_opt_in='aviaTBdouble_opt_in' on_send='' sent='Спасибо! Перейдите, пожалуйста, в почту и подтвердите подписку' link='manually,http://' color='']
    [av_mailchimp_field id='0' type='text' check='is_email' options='' label='E-mail' width='element_third']
    [av_mailchimp_field id='3' type='text' check='' options='' label='Имя' width='element_third']
    [av_mailchimp_field id='av-button' type='button' check='' options='' label='Подписаться' width='element_third']
    [/av_mailchimp]

    Thank you!

    #570706

    Hi Alisa!

    Try this:

    
    function add_mc_after_post_content() {
    if (is_singular("post")){
    ?>
    <div class="av-sub-box">
    <h5 class='av-sub-box-title'>Suscribe to our Blog</h5>
    <?php echo do_shortcode("[av_mailchimp list='XXXX' double_opt_in='aviaTBdouble_opt_in' on_send='' sent='Спасибо! Перейдите, пожалуйста, в почту и подтвердите подписку' link='manually,http://' color='']
    [av_mailchimp_field id='0' type='text' check='is_email' options='' label='E-mail' width='element_third']
    [av_mailchimp_field id='3' type='text' check='' options='' label='Имя' width='element_third']
    [av_mailchimp_field id='av-button' type='button' check='' options='' label='Подписаться' width='element_third']
    [/av_mailchimp]"); ?>
    </div>
    <?php
    }
    }
    add_action('ava_after_content', 'add_mc_after_post_content');

    Best regards,
    Josue

    #570786

    Josue,

    I’ve tried it, but the form is not displayed. Only the title of this block. You can see http://vkk-journal.ru/bank-rossi-razmestil-na-svoem-sayte-spravochnik-uchastnikov-finansovogo-ryinka/

    #570888

    Hi,

    Can you please create me a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #570897

    Yes.

    #570941

    Hey!

    I couldn’t login to wp-admin, FTP worked though. I tried doing some changes to the code but they didn’t get reflected, i guess that’s because the frontend is being cached.

    Try putting all the shortcodes in one line:

    <?php echo do_shortcode("[av_mailchimp list='0001530978' double_opt_in='aviaTBdouble_opt_in' on_send='' sent='Ñïàñèáî! Ïåðåéäèòå, ïîæàëóéñòà, â ïî÷òó è ïîäòâåðäèòå ïîäïèñêó' link='manually,http://' color=''][av_mailchimp_field id='0' type='text' check='is_email' options='' label='E-mail' width='element_third'][av_mailchimp_field id='1' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Êîìïàíèÿ' width=''][av_mailchimp_field id='2' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Ãîðîä' width=''][av_mailchimp_field id='3' type='text' check='' options='' label='Èìÿ' width='element_third'][av_mailchimp_field id='4' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Ðåãèîí' width=''][av_mailchimp_field id='5' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Ñêà÷àëè æóðíàë' width=''][av_mailchimp_field id='6' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Ôàìèëèÿ' width=''][av_mailchimp_field id='7' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Êàòåãîðèÿ' width=''][av_mailchimp_field id='8' type='date' check='' options='' disabled='aviaTBaviaTBdisabled' label='Äàòà îïëàòû' width=''][av_mailchimp_field id='10' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Ïîäïèñêà' width=''][av_mailchimp_field id='11' label='Àçáóêà' type='text' value='' disabled='true' check=''][/av_mailchimp_field][av_mailchimp_field id='12' type='text' check='' options='' disabled='aviaTBaviaTBdisabled' label='Áèáëèîòå÷êà ÊÏÊ' width=''][av_mailchimp_field id='av-button' type='button' check='' options='' label='Ïîäïèñàòüñÿ' width='element_third'][/av_mailchimp]"); ?>
    

    Best regards,
    Josue

    #570951

    Josue!

    It works! Thank you!))))

    #570957

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Mailchimp after post’ is closed to new replies.