Title: Posts showing php code
Last modified: August 19, 2016

---

# Posts showing php code

 *  [npannos](https://wordpress.org/support/users/npannos/)
 * (@npannos)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/)
 * Hello,
 * PHP code is showing up in my posts, unless i have the adequate amount of text.
   Sometimes my posts only contain pictures or videos, so there wouldn’t be much
   text, only a description. This is an example of what is showing up (SHARETHIS.
   addEntry({ title: “test”, url:)
 * Link [http://www.crookedminds.com](http://www.crookedminds.com)
 * I can’t figure out why this would be happening.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [motivatebusiness](https://wordpress.org/support/users/motivatebusiness/)
 * (@motivatebusiness)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089190)
 * Hello,
 * Can you post your code for index.php and(or) archive.php
 * [**signature moderated** Please read the [Forum Rules](http://wordpress.org/support/topic/68664?replies=6)]
 *  Thread Starter [npannos](https://wordpress.org/support/users/npannos/)
 * (@npannos)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089208)
 * > <?php get_header(); ?>
   >  <div id=”content” class=”narrowcolumn”> <?php if (have_posts()):?
   > > <?php $post = $posts[0]; ?> <div class=”sub” style=”padding-top:8px;”><span
   > class=”rss-feed”><img src=”<?php echo get_option(‘home’); ?>/wp-content/themes/
   > Tauren/img/rss.gif” alt=”RSS Feed” border=”0″ class=”float-none” style=”border:
   > 0px; margin:0px 5px 0px 0px;” />**“>Subscribe**</span></div> <div class=”titlebg”
   > ><?php wp_title(); ?></div> <div class=”clickbg”> <div class=”bread”><?php 
   > if (class_exists(‘breadcrumb_navigation_xt’)) { echo ”; // New breadcrumb object
   > $mybreadcrumb = new breadcrumb_navigation_xt; // Options for breadcrumb_navigation_xt
   > $mybreadcrumb->opt[‘title_blog’] = ‘Home’; $mybreadcrumb->opt[‘separator’] 
   > = ‘ » ‘; $mybreadcrumb->opt[‘singleblogpost_category_display’] = true; // Display
   > the breadcrumb $mybreadcrumb->display(); } ?></div> </div> <?php include ‘sidebar-
   > right.php’;?> <div style=”width:525px; float:left; padding:5px 10px 5px 5px;”
   > > <?php include ‘adsense/468×60.php’;?> <div class=”post”> <div class=”entry”
   > > <?php while (have_posts()) : the_post(); ?>
   > <div class=”fieldset-box”>
   >  <div class=”legend-box”>“><?php the_title2(”, ”,
   > true, ’58’) ?>
   > </div>
   >  <div class=”POST-INFO”> By <b><?php the_author_posts_link()?
   > ></b> – <b>Last updated:</b> <?php the_time(‘l, F j, Y’) ?> </div><div class
   > =”cat-image”>“><img style=”padding:0px; border:0px; margin:0px;” width=”150″
   > height=”150″ src=”<?php echo get_post_meta($post->ID, “Thumbnail”, true); ?
   > >” /></div> <?php the_content_limit(250, “”); ?> <div class=”continue-reading”
   > > <b>“>Read More »</b> </div> </div> <?php endwhile; ?>
   > <?php
   >  if(class_exists(‘wp_pagination_plugin’)){ $p = new wp_pagination_plugin;
   > $p->show(); } ?> </div> </div> </div> </div> <?php else : ?> <?php include (
   > TEMPLATEPATH . ‘/notfound.php’);?> <?php endif; ?> <?php get_footer(); ?>
 * and archive
 * > <?php get_header(); ?>
   >  <div id=”content” class=”narrowcolumn”> <?php if (have_posts()):?
   > > <?php $post = $posts[0]; ?> <div class=”sub” style=”padding-top:8px;”><span
   > class=”rss-feed”><img src=”<?php echo get_option(‘home’); ?>/wp-content/themes/
   > Tauren/img/rss.gif” alt=”RSS Feed” border=”0″ class=”float-none” style=”border:
   > 0px; margin:0px 5px 0px 0px;” />**“>Subscribe**</span></div> <div class=”titlebg”
   > ><?php wp_title(); ?></div> <div class=”clickbg”> <div class=”bread”><?php 
   > if (class_exists(‘breadcrumb_navigation_xt’)) { echo ”; // New breadcrumb object
   > $mybreadcrumb = new breadcrumb_navigation_xt; // Options for breadcrumb_navigation_xt
   > $mybreadcrumb->opt[‘title_blog’] = ‘Home’; $mybreadcrumb->opt[‘separator’] 
   > = ‘ » ‘; $mybreadcrumb->opt[‘singleblogpost_category_display’] = true; // Display
   > the breadcrumb $mybreadcrumb->display(); } ?></div> </div> <?php include ‘sidebar-
   > right.php’;?> <div style=”width:525px; float:left; padding:5px 10px 5px 5px;”
   > > <?php include ‘adsense/468×60.php’;?> <div class=”post”> <div class=”entry”
   > > <?php while (have_posts()) : the_post(); ?>
   > <div class=”fieldset-box”>
   >  <div class=”legend-box”>“><?php the_title2(”, ”,
   > true, ’58’) ?>
   > </div>
   >  <div class=”POST-INFO”> By <b><?php the_author_posts_link()?
   > ></b> – <b>Last updated:</b> <?php the_time(‘l, F j, Y’) ?> </div><div class
   > =”cat-image”>“><img style=”padding:0px; border:0px; margin:0px;” width=”150″
   > height=”150″ src=”<?php echo get_post_meta($post->ID, “Thumbnail”, true); ?
   > >” /></div> <?php the_content_limit(250, “”); ?> <div class=”continue-reading”
   > > <b>“>Read More »</b> </div> </div> <?php endwhile; ?>
   > <?php
   >  if(class_exists(‘wp_pagination_plugin’)){ $p = new wp_pagination_plugin;
   > $p->show(); } ?> </div> </div> </div> </div> <?php else : ?> <?php include (
   > TEMPLATEPATH . ‘/notfound.php’);?> <?php endif; ?> <?php get_footer(); ?>
 *  Thread Starter [npannos](https://wordpress.org/support/users/npannos/)
 * (@npannos)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089209)
 * Thanks for taking a look at it business.
 *  Thread Starter [npannos](https://wordpress.org/support/users/npannos/)
 * (@npannos)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089282)
 * does anyone know how to fix this? :/
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089283)
 * Open your theme’s functions.php, look for `function the_content_limit()` and 
   post just that code section.
 * Please don’t post huge chunks of code here. For larger blocks of code (such as
   the entire functions.php file), please consider using the [WordPress pastebin](http://wordpress.pastebin.ca/).
   It makes life easier for everyone..
 *  Thread Starter [npannos](https://wordpress.org/support/users/npannos/)
 * (@npannos)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089286)
 * I just searched for it, and i don’t see that string anywhere in my functions.
   php Sorry about posting all of the code, i didn’t know how else to do it.
 *  Thread Starter [npannos](https://wordpress.org/support/users/npannos/)
 * (@npannos)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089290)
 * I changed the content limit from 200 to 100 but if there isn’t any text in the
   post, it will fill it up with either flash code or css code.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089291)
 * Try replacing `<?php the_content_limit(100, ""); ?>` with `<?php the_content();?
   >`.
 *  Thread Starter [npannos](https://wordpress.org/support/users/npannos/)
 * (@npannos)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089293)
 * I tried that, and get a bunch of errors.
 * Warning: Missing argument 1 for the_content_limit(), called in /home/content/
   c/r/o/crookedminds/html/wp-content/themes/Tauren/home.php on line 113 and defined
   in /home/content/c/r/o/crookedminds/html/wp-content/plugins/limit-post.php on
   line 18

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Posts showing php code’ is closed to new replies.

 * 9 replies
 * 3 participants
 * Last reply from: [npannos](https://wordpress.org/support/users/npannos/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/posts-showing-php-code/#post-1089293)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
