What happens if you use the shortcode in a default template page using Twenty Eleven?
using Twenty Eleven the contact form is working, but how is that going to help me find out why isnt working on a custom template? Thanks for reply!
It sounds like the issue is in your custom page template. What are you using to display the page content?
<div id="oprojektu2">
<?php query_posts("posts_per_page=1&post_type=page&page_id=14"); the_post(); ?>
<h3 class="floatleft"><?php the_title(); ?></h3>
<p class="floatleft"><?php echo get_the_content(); ?></p>
</div>
Don’t use get_the_content()
. Try using the_content()
instead.
yes, that’s it! Thank you, what a simple solution! Do you know whay is that?
the_content()
function doesn’t just get the page’s content from the database. It pre-processes it via a number of WordPress core filters before displaying it. One of those filters expands all shortcodes and that’s the bit that you were missing previously.
Hello,
I am having a similar problem, but I’m not sure I understand the answer. I do not know very much about coding, perhaps you can help me?
I just installed contact form 7, and I am pasting the short code from my wordpress admin into a custom page.
Here is the code I am pasting in:
[contact-form-7 id=”180″ title=”Contact form 1″]
Instead of showing up as a form, I get this:
[contact-form-7 404 “Not Found”]
I have Contact Form 7 3.3 installed and wordpress 3.4
Initially, I had ‘Contact Form 7 – Customfield in mail’ installed, but I de-activated that too see if that was the problem and nothing changed.
I have also tried pasting this code into HTML, but had no luck there either….
Any ideas on what might be causing this? How can I correct it? You mention a Twenty Eleven, I do not know what that is….?
Thanks!