Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › Shortcode Shows Up in Post
Tagged: shortcode
- This topic has 6 replies, 4 voices, and was last updated 14 years, 10 months ago by amin007.
-
AuthorPosts
-
January 10, 2010 at 2:42 am #643eddlemanMember
When I post the test code: [wp_cart:Test Product:price:15.00:end]
in a post it just shows it as plain text when I view it online.
I’ve tried it several ways but it still just shows up as
plain text.
I did search the whole forum for an answer. Sorry for such a noob question.
Could you give me some insight in to what could be wrong.
I’m on wp 2.9. Using the latest version.
Do <Div> tags and css classes in my template mess it up?
January 10, 2010 at 5:02 am #17130dominick41MemberI am having the same problem
January 10, 2010 at 5:23 am #17131amin007ParticipantIf the “<div>” tags and css classes in your template are not used properly then it can mess things up but I don’t think this is the issue here.
Can you post a link to your page?
Also, a good test is to disable all the plugins except the well known ones (e.g Akisment, All in all SEO etc) and switch your theme to the default wordpress theme then see what happens. If the button appears then you can start to activate the plugins back and see which one causes the problem. There are too many plugins and themes out there that are not coded according to WordPress coding standards and it causes more problem most of the time.
January 10, 2010 at 2:02 pm #17132eddlemanMemberJanuary 10, 2010 at 2:07 pm #17133eddlemanMemberWell the deactivation of the plugins worked. I think it may have been a plugin that was associated with placing a google map in a post… Does that make sense?
January 28, 2010 at 5:42 pm #17134dycrawMemberHello,
First of all thanks for a great little plugin it is perfect for my needs. I have installed it and things are working fine so far. However I am having one issue. One I place the wp_cart tags directly in a post everything works fine, however when I place the code in to a template as follows this link is the end result http://dylanscott.net/colours4aura/?p=65
(<?php
/*
Template Name Posts: Colour Template
*/
?>
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id=”content”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”post”>
<h2><?php the_title(); ?></h2>
<div class=”contenttext”>
<?php the_content(‘<p>Read more »</p>’); ?>
</div>
<p class=”contenttext”>
Available Samples:
16″ x 16″ handpainted artbord sample – $10.00 [wp_cart:DSC001.5 16×16:price:10.00:end]
250ml matte finish sample pot – $12.00 [wp_cart:DSC001.5 250ml :price:12.00:end]
</p>
<p class=”styleShipping”>Please note their is a flat rate shipping charge of $15 for up to 6 items to mainland North America. Please contact us directly regarding shipping costs to additional destinations, on larger orders or for express services.
</p>
<?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>
<p class=”postinfo”>Posted: <?php the_time(‘F jS, Y’) ?> under <?php the_category(‘, ‘) ?>.
<?php the_tags(‘Tags: ‘, ‘, ‘,”); ?><?php edit_post_link(‘[edit]’,’ | ‘,”); ?></p>’
<div class=”navigation”>
<p><span class=”prevlink”><?php previous_post_link(‘« %link’,’Previous post’,”); ?></span>
<span class=”nextlink”><?php next_post_link(‘%link »’,’Next post’,”); ?></span></p>
</div>
<?php comments_template(); ?>
<?php endwhile; else: ?>
<p>No matching entries found.</p>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>
<style type=”text/css”>
)
Any suggestion you have would be a great help. I’m a hack when it comes to these things so hopefully it won’t be to complicated of a work around.
January 28, 2010 at 11:51 pm #17135amin007ParticipantShortcodes only work on posts and pages… you need to use the corresponding PHP function call when using it from the template files. The documentation site has instructions on this.
-
AuthorPosts
- You must be logged in to reply to this topic.