Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter duncanmoo

    (@duncanmoo)

    Hi Katrina, I do not use the plugin and will be unlikely to use it, the error occurred on my local dev so I immediately uninstalled the plugin and looked elsewhere.

    I am now using https://www.ads-software.com/plugins/yet-another-related-posts-plugin/

    You have probably figured this out, but get_template_directory_uri() will return the parent theme’s directory.

    Use get_stylesheet_directory_uri() to include resources that are intended to be included in/over-ridden by the Child Theme.

    Not a good idea to hack a module, but a quick solution to this is to change the email field sml_emailinput to an HTML5 email field rather than a text field, Line 85 of sml.php:

    $return .= '<p class="sml_email"><label class="sml_emaillabel" for="sml_email">'.$emailtxt.'</label><input class="sml_emailinput" name="sml_email" placeholder="'.$emailholder.'" type="email" value="" required="required"></p>';

    • changed type=”text” to type=”email”
    • added required=”required”

    Same issue using the shortcode and setting showname=false but the name field still appears.

    Changed it to showname=0 and name field is gone!

    duncanmoo

    (@duncanmoo)

    If you are using a Multisite you need to add the file extension to the list at /wp-admin/network/settings.php

    Such a simple solution if you want to globally enable a file type on a multisite.

    Thread Starter duncanmoo

    (@duncanmoo)

    Thanks James and no need to apologize, I really appreciate you getting back to me on this. It does let anyone out there know that for now the widget can not be called other than through using the WP widget interface.

    Thread Starter duncanmoo

    (@duncanmoo)

    Thanks James

    This gets me closer, but not quite there yet, my shortcode now looks like this:

    // [chimpsubs letter=locals]
    function chimpsubs($atts) {
    	extract(shortcode_atts(array(
    	      'letter' => 'xyz123456'
         ), $atts));
    
    	ob_start();
    		the_widget('NS_Widget_MailChimp',array('signup_text'=>'subscribe',
    											   'current_mailing_list'=>$letter,
    											   'failure_message'=>'There was a problem processing your submission.',
    											   'success_message'=>'Thank you for joining our mailing list. Please check your email for a confirmation link.'));
    		$output = ob_get_contents();
        ob_end_clean();
        return $output;
    }
    add_shortcode('chimpsubs', 'chimpsubs');

    Form displays nicely but submission says “Sorry, but that does not look like an email address to me.” for perfectly valid addresses (ones that do work on the sidebar).
    Noticed a variable on sidebar HTML:
    <input type="hidden" value="3" name="ns_mc_number">
    which on my custom implementation displays as:
    <input type="hidden" value="-1" name="ns_mc_number">

    The full HTML of a call to the shortcode:

    <div class="widget widget_ns_mailchimp">
    	<h2 class="widgettitle"></h2>
    	<form method="post" id="ns_widget_mailchimp_form--1" action="/newsletter/">
    		<div class="error"></div>
    		<label>Email Address :</label>
    		<input type="hidden" value="-1" name="ns_mc_number">
    		<input type="text" name="ns_widget_mailchimp_email">
    		<input type="submit" value="subscribe" name="subscribe" class="button">
    	</form>
    	<script type="text/javascript">
    	jQuery('#ns_widget_mailchimp_form--1').ns_mc_widget({"url" : "/index.php", "cookie_id" : "ns_widget_mailchimp--1", "cookie_value" : "hidden hash", "loader_graphic" : "https://website.localhost/wp-content/plugins/mailchimp-widget/images/ajax-loader.gif"});
    	</script>
    </div>

    What am I missing?

    I am experiencing the same issue as you @pawpawsteve on a multisite installation. I am however able to upload smaller images, why would this be you WP pro’s out there is there something in the “crunching…” that is timing out? where would I go to check for an error?

    • Upload limit is set at 2 meg, files of 200k fail while 5k images get through.
    • I have recieved the little red error text “HTTP error” and “IO error”

    Similar thread also not resolved

    Thread Starter duncanmoo

    (@duncanmoo)

    I was using Firefox, but I just installed on a Buddypress site and a normal WP site and did not have this issue. Sorry I can also not reproduce the issue elsewhere.

    Thanks for this I am a real newbie on WP.

    But I would qualify your query a little so that you only display this conditional data if the page is in fact published.

    My example below returns the ID of a page and I am limiting it to child pages of post_parent=17:

    function wp_exist_page_by_title($title_str) {
    	global $wpdb;
    	return $wpdb->get_row("SELECT ID FROM wp_posts WHERE post_title = '" . $title_str . "' && post_status = 'publish' && post_type = 'page' && post_parent=17", 'ARRAY_N');
    }

Viewing 10 replies - 1 through 10 (of 10 total)