• 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 https://www.crookedminds.com

    I can’t figure out why this would be happening.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    Can you post your code for index.php and(or) archive.php

    [signature moderated Please read the Forum Rules]

    Thread Starter npannos

    (@npannos)

    <?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

    (@npannos)

    Thanks for taking a look at it business.

    Thread Starter npannos

    (@npannos)

    does anyone know how to fix this? :/

    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. It makes life easier for everyone..

    Thread Starter npannos

    (@npannos)

    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

    (@npannos)

    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.

    Try replacing <?php the_content_limit(100, ""); ?> with <?php the_content(); ?>.

    Thread Starter npannos

    (@npannos)

    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.