Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- So, this is the function that will add something to the first paragraph, I want to add everything below after the_content on posts that are part of the store.
- Sample function
- function add_some_stuff($content) {
- $whateveryouwanttoadd = 'something here';
- $content = preg_replace('/<\/p>/', '</p><p>'. $whateveryouwanttoadd.'</p>', $content, 1);
- return $content;
- }
- add_filter('the_content', 'add_some_stuff');
- All of this is the paypal link stuff that needs to be added.
- <?php $price = get_post_custom_values("thestore_price"); ?>
- <?php $shipping = get_post_custom_values("thestore_shipping"); ?>
- <?php $another = get_post_custom_values("thestore_shipping2"); ?>
- <?php $display = get_post_custom_values("thestore_display"); ?>
- <?php if($display[0] == 'on') { ?>
- <form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">
- <input type="hidden" name="cmd" value="_cart">
- <input type="hidden" name="business" value="<?php echo $mama_paypal; ?>">
- <input type="hidden" name="item_name" value="<?php the_title(); ?>">
- <input type="hidden" name="shopping_url" value="<?php the_permalink(); ?>">
- <input type="hidden" name="item_number" value="<?php the_ID(); ?>">
- <input type="hidden" name="amount" value="<?php echo $price[0]; ?>">
- <input type="hidden" name="currency_code" value="USD">
- <input type="hidden" name="shipping" value="<?php echo $shipping[0]; ?>">
- <input type="hidden" name="shipping2" value="<?php echo $another[0]; ?>">
- <input type="hidden" name="handling_cart" value="<?php echo $mama_handling; ?>">
- <input type="hidden" name="bn" value="ButtonFactory.PayPal.001">
- <input type="image" name="add" src="http://www.powersellersunite.com/buttonfactory/sc-but-01.gif">
- </form>
- <?php } ?>
Add Comment
Please, Sign In to add comment