Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have problems with the plugins CF 7 & FSF. When I paste the code

[si-contact-form form='1'] 

for FSF I get the result of the code "[si-c..." itself when I load the page instead of a form. I have built a custom theme and doesnt have any other plugins installed. The same thing happens when I try to use CF 7 and the embedded code provided by that plugin.

I have several javascripts enqued in functions.php.

I have included wp_head() & wp_footer() in the file so I know that's not the problem.

This is how my functions.php file looks like, am I missing something here?

<?php

function add_js()  
{  
        // Register Jquery & UI
        wp_deregister_script( 'jquery' );
      wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
        wp_register_script( 'jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js' );


    // Register the scripts for theme
        wp_register_script( 'modernizr', get_template_directory_uri() . '/js/modernizr-2.0.6.custom.js', true);
        wp_register_script( 'modernizr-pointerevents', get_template_directory_uri() . '/js/modernizr-pointerevents.min.js', true);   
        wp_register_script( 'easing', get_template_directory_uri() . '/js/jquery.easing-1.3.pack.js', array('jquery'), true);  
        wp_register_script( 'localscroll', get_template_directory_uri() . '/js/jquery.localscroll-1.2.7-min.js', array('jquery'), true);  
        wp_register_script( 'scrollto', get_template_directory_uri() . '/js/jquery.scrollTo-1.4.2-min.js', array('jquery'), true);
        wp_register_script( 'backstretch', get_template_directory_uri() . '/js/jquery.backstretch.min.js', array('jquery'), true); 
        wp_register_script( 'mousewheel', get_template_directory_uri() . '/js/jquery.mousewheel.min.js', array('jquery'), true);   
        wp_register_script( 'customScrollbar', get_template_directory_uri() . '/js/jquery.mCustomScrollbar.min.js', array('jquery'), true);  
        wp_register_script( 'functions', get_template_directory_uri() . '/js/functions.js', array('jquery'), true);    


    // Enque the scripts 
        wp_enqueue_script( 'jquery' );
        wp_enqueue_script( 'jquery-ui' );
        wp_enqueue_script( 'modernizr' ); 
        wp_enqueue_script( 'modernizr-pointerevents' ); 
        wp_enqueue_script( 'easing' ); 
        wp_enqueue_script( 'localscroll' ); 
        wp_enqueue_script( 'scrollto' ); 
        wp_enqueue_script( 'backstretch' );
        wp_enqueue_script( 'mousewheel' ); 
        wp_enqueue_script( 'customScrollbar' );  
    wp_enqueue_script( 'functions' );  
}  

add_action( 'wp_enqueue_scripts', 'add_js' );


?>

I had to deregister jquery and register it manually in order to get the scripts depending on jquery to work. Could this be the error that make the plugins stop working?

I have tested with other plugins, such as compress of js & css and those works.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I found the solution myself,

It had something to do with my code echoing out

$content = $page->post_content
... echo $content;...

I changed this to

$content = apply_filters('the_content', $page->post_content);
... echo $content;...

And now it works!

Ref: http://stackoverflow.com/questions/6405974/using-get-pages-in-wordpress-is-stripping-out-my-p-tags

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.