1
votes

I have started to learn how to make custom themes for wordpress and have problems when installing plugins that have shortcodes. I try to add a shortcode ( usually a form plugin, i have tried two different ones and also an ecwid shopping cart yet no shortcodes have worked, yes the plugins were activated) by creating a page and using the visual/html editor. When i check the page it does not show anything. here is my single.php..

<?php get_header(); ?>
  <body>
  <div id="maintopwrapper">
    <div class="container" id="topwrapper">
<div class="row">
<div class="span8">




 <?php while (have_posts()) : the_post(); ?>
<!-- Content Here -->

<div class="row"><div class="span8 greygrad round">
<div class="padding"><div class="content" style="margin-top:25px;"><?php the_content(); ?></div></div></div></div>

<div class="row margintop"><div class="span8 greygrad round">
<div class="padding">

<?php comments_template() ?>
</div></div></div>




<?php endwhile;?> 



</div>
<?php get_sidebar(); ?>


</div>
    </div>

    </div> <!-- end of maintop wrapper-->

<?php get_footer(); ?>

It should show since the_content() is there right? Let me know if you need anything else for me to share. Plugins I tried a gravityforms, ecwid shopping cart, and quforms..all of which the shortcodes do not work. The only way I got one of them to work is by creating a custom page theme and adding hardcoded php to call the function but I rather have shortcodes working so the theme is usuable by people who dont code.

For live example: http://modernlogic.co/wp

the "contact" page in menu is actually hardcoded in the custom theme which is not using the shortcodes like I want in the "sample page" in menu

Thanks in advance

1
When you say "it does not show anything", do you mean your page doesn't render, or that it renders but with no content, or that it renders with all content except what you'd expect from the shortcode?Sepster
The shortcodes dont render or even just show up as text like [shortcode] , its as if they are not even there.. live test site is modernlogic.co/wp/sample-page just look for div with "content" as you see in the footer, if I use it as a widget it will work..CI_Guy
the "contact" page in menu is actually hardcoded in the custom theme which is not using the shortcodes like I want in the "sample page" in menuCI_Guy
deactivate all plugins and check one by oneHareesh
I started with a fresh install and the shortcodes within a post/page for the default theme and it works , however when I goto my theme the shortcodes no longer work.. do I need something special in my functions.php and I thought it really only need the_content() in order to show the post/page which has shortcodes to work..CI_Guy

1 Answers

0
votes

I am a idiot... I realized that I had no page.php and so when I tried adding the shortcode to a page it referred to the index.php instead of page.php(since there was none) and so it only showed the excerpt and not the content. I figured this out because I tried adding the shortcode to a post and so when it went to single.php, the shortcode worked since it has content and not just excerpt. oh well I guess trial and error.. Thanks for trying to help me anyway