• Resolved trebtreb

    (@trebtreb)


    Im trying to use the easy-contact plugin in the footer of my wordPress blog.

    But I can’t work out how to do it, as it only supports shortCode.

    What i’ve found in the plugin:

    // Register the shortcode to the function ec_shortcode()
    add_shortcode( 'easy-contact', 'ec_shortcode' );

    Which must mean that [easy-contact] = ec_shortcode()

    If I add ec_shortcode() to my footer I get this error:
    Warning: Missing argument 1 for ec_shortcode(),
    So I check how the function looks cause im obviously not passing it the right variable:

    // Finds [easy-contact] shortcode and produces the form in the content
    function ec_shortcode($attr) {
    	global $ec_form_fields;
    	// If we're processing $POST data without a problem, let's send an email
    	if ( ec_check_input() ) {
    ...etc...

    By the looks of it I need to do this ec_shortcode($attr), but $attr isn’t mentioned any where else in the entire plugin…
    What is it? What do i need to send to this function?

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

The topic ‘ShortCode in PHP?’ is closed to new replies.