WordPress.org

Ready to get started?Download WordPress

Forums

Remove "test message" (4 posts)

  1. rohitmanglik
    Member
    Posted 2 years ago #

    In my website I am getting "Test message" words before footer of the page.
    e.g. http://www.careerbreeder.com/cb-test/ , http://www.careerbreeder.com/about-us-2/

    I created one custom template whose code is -

    [mod: please mark any posted code using the code button; and do use the pastebin for any code over 10 lines - forum guidelines]

    <?php
    /*
    Template Name:Static Page
    */
    get_header(); ?>
    
        <!--h1>Main Area</h1-->
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <h1><?php the_title(); ?></h1>
        <p><?php do_shortcode(the_content()); ?></p>
        <?php endwhile; else: ?>
        <?php //_e('Sorry, no posts matched your criteria.'); ?>
        <?php endif; ?>
    <div id="delimiter"></div>
      <?php //get_sidebar(); ?>
    
    <?php get_footer(); ?>

    I tried Googling but dint get any clue where I am getting wrong. I checked in other files of theme as well but I am unable to trace "test message" anywhere.

  2. shirazdrum
    Member
    Posted 2 years ago #

    Check the page content.

  3. tommix
    Member
    Posted 2 years ago #

    Download your WP installation to your PC use TextCrawler to search that test in php files and you'll find where you left that message, and then in delete it and reupload file to server.

  4. alchymyth
    Forum Moderator
    Posted 2 years ago #

    in 'cb-test', the text seems to be coming from this section:

    <p><?php do_shortcode(the_content()); ?></p>

    i.e. is coming from the content of those pages.

    what shortcodes are you using within the content of 'cb-test'?
    and are you using the same shortcodes within the content of 'about us'?

    btw:
    this section is totally invalid code and should possibly be simplified to:

    <?php the_content(); ?>

    what did you intend to get with that code?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.