angelas111
Elite Member
- Jan 4, 2009
- 1,648
- 1,052
i am trying to add some code to get my wordpress theme to delete any commas in my wordpress posts. can someone show me where to put it? here is the code i am trying to use:
and here is my single.php file (i believe this is the right file)
PHP:
echo str_replace(',', ' ',
PHP:
<?php get_header(); ?>
<?php if (get_option('flex_feat_display') == "no" OR get_option('flex_feat_pages') == "home only") { ?>
<?php } else { ?>
<?php if (get_option('flex_header_trans') == "yes" && get_option('flex_feat_trans') == "yes" && get_option('flex_nav_position') == "below") { ?>
<script type="text/javascript">
jQuery("#nav").css("border-bottom","solid <?php echo get_option('flex_blog_borderwidth'); ?>px #<?php echo get_option('flex_blog_bordercolor'); ?>");
</script>
<?php } ?>
<div id="feature">
<div class="topshadow">
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Top Feature') ) : else : ?>
<?php include (TEMPLATEPATH . '/feature.php'); ?>
<?php endif; ?>
<div style="clear:both;"></div>
</div>
</div>
<?php } ?>
<?php if (get_option('flex_nav_show') == "yes" && (get_option('flex_nav_position') == "below feature")) {
include (TEMPLATEPATH . '/includes/nav.inc.php');
} ?>
<div id="content">
<?php if (get_option('flex_adsense_loc1') == "yes" && !get_option('flex_adsense_loc1banner')) { ?>
<div style="width:730px;height:90px;display:block;margin:5px auto 15px auto;text-align:center;">
<?php
$adsize = get_option('flex_adsense_loc1size');
$adtype = get_option('flex_adsense_loc1type');
$adchannel = get_option('flex_adsense_loc1channel');
include('adsense.php'); ?>
</div>
<?php } else if (get_option('flex_adsense_loc1') == "yes" && get_option('flex_adsense_loc1banner')) { ?>
<div style="width:730px;height:90px;display:block;margin:5px auto 15px auto;text-align:center;">
<?php echo stripslashes(get_option('flex_adsense_loc1banner')); ?>
</div>
<?php } ?>
<?php if (get_option('flex_lsb_show') == "yes" && get_option('flex_lsb_pos') == "left of post") { get_sidebar('left'); } ?>
<div class="postwrap">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="posthead">
<h1><?php the_title(); ?></h1>
<?php if (get_option('flex_metadata_show') == "yes") { ?>
<div class="postMeta">
<div class="postdate">
<?php the_time('l, F jS, Y') ?>
at
<?php the_time() ?>
Â
<?php edit_post_link('Edit'); ?>
</div>
<div style="clear:both;"></div>
</div>
<?php } ?>
</div>
<div class="postcontent">
<?php if (get_option('flex_adsense_loc4') == "yes" && !get_option('flex_adsense_loc4banner')) { ?>
<div style="display:block; margin:10px 0 15px 0;">
<?php
$adsize = get_option('flex_adsense_loc4size');
$adtype = get_option('flex_adsense_loc4type');
$adchannel = get_option('flex_adsense_loc*****nel');
include('adsense.php'); ?>
</div>
<?php } else if (get_option('flex_adsense_loc4') == "yes" && get_option('flex_adsense_loc4banner')) { ?>
<div style="display:block; margin:10px 0 15px 0; text-align:center;">
<?php echo stripslashes(get_option('flex_adsense_loc4banner')); ?>
</div>
<?php } ?>
<?php the_content('Read the rest of this entry'); ?>
<?php wp_link_pages('before=<div id="page-links"><p style="text-align:right"><strong>Pages:</strong>&after=</p></div>'); ?>
<?php if (get_option('flex_show_tags') == "yes") { ?>
<p><?php the_tags('<strong>Tagged with:</strong> ',' • ',''); ?></p>
<?php } else { ?>
<?php } ?>
<?php if (get_option('flex_show_cats') == "yes") { ?>
<p><strong>Filed under: </strong><?php the_category(' • '); ?></p>
<?php } else { ?>
<?php } ?>
<?php if (get_option('flex_show_like') == "yes") { ?>
<p><strong>Like this post?</strong> <a href="<?php if (get_option('flex_email_address')) { echo get_option('flex_email_address'); } else { bloginfo_rss('rss2_url');} ?>">Subscribe to my RSS feed</a> and get loads more! </p>
<?php } ?>
<?php if (get_option('flex_adsense_loc5') == "yes" && !get_option('flex_adsense_loc5banner')) { ?>
<div style="display:block; margin:10px 0 15px 0;">
<?php
$adsize = get_option('flex_adsense_loc5size');
$adtype = get_option('flex_adsense_loc5type');
$adchannel = get_option('flex_adsense_loc5channel');
include('adsense.php'); ?>
</div>
<?php } else if (get_option('flex_adsense_loc5') == "yes" && get_option('flex_adsense_loc5banner')) { ?>
<div style="display:block; margin:10px 0 15px 0; text-align:center;">
<?php echo stripslashes(get_option('flex_adsense_loc5banner')); ?>
</div>
<?php } ?>
</div>
<div class="clearer"></div>
</div>
<?php if (get_option('flex_metadata_comoff') == "yes") { ?>
<ul class="Note">
<?php if ( comments_open() ) : ?>
<li class="NoteRss">
<?php post_comments_feed_link( $link_text = 'Comments RSS Feed') ?>
</li>
<?php endif; ?>
<?php if ( pings_open() ) : ?>
<li class="NoteTrackBack"><a href="<?php trackback_url() ?>" rel="trackback">
<?php _e('TrackBack <abbr title="Uniform Resource Identifier">URI</abbr>'); ?>
</a></li>
<?php endif; ?>
</ul>
<?php comments_template('', true); ?>
<?php } ?>
<?php endwhile; else : ?>
<h2>
<?php _e('Not Found'); ?>
</h2>
<p>
<?php _e('Sorry, but the page you requested cannot be found.'); ?>
</p>
<?php endif; ?>
</div>
<?php if (get_option('flex_lsb_show') == "yes" && get_option('flex_lsb_pos') == "right of post") { get_sidebar('left'); } ?>
<?php if (get_option('flex_rsb_show') == "yes" || !get_option('flex_rsb_show')) { get_sidebar(); } ?>
</div>
<?php get_footer(); ?>