WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Password protection is not working properly on external site (6 posts)

  1. XratedFozzibaer
    Member
    Posted 8 years ago #

    Hi there,

    I recently intsalled WordPress on our Ski-Club Homepage and I like it very much!
    I created some external php-sites to display posts from one categorie only. For now everything worked fine, but today I discovered a flaw with the single post password protection. In the external site, the content won't show up. On the WordPress main page, everything is doing fine!
    What could be the problem?

    To see the external site please vistit http://www.sc-dingolfing.de
    and click on "Aktuelles" in the left top area (The sites are in german).
    There is a password protected post (pass is "test").

    I would appreciate any suggestions!

  2. Kafkaesqui

    Posted 8 years ago #

    What are you using to display the content in your "external" php page? Does it use the_content() template tag, or something else?

  3. XratedFozzibaer
    Member
    Posted 8 years ago #

    The page uses "the loop" and "the_content".
    Here is the code (stripped to the necessary)

    <?php
    if (!isset($cat)) {
    $cat = 10;
    }

    require('/homepages/5/d15629244/htdocs/wordpress/wp-blog-header.php');
    ?>
    <html>
    <head>
    <base target="_self"></base>
    </head>

    <body>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <table class="post" align="center" cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td class="star"><img src="http://www.sc-dingolfing.de/wordpress/wp-content/themes/scd/stern_ani.gif"></td>
    <td class="datum"><nobr><b><?php the_time('d.m.Y'); ?></b></nobr></td>
    <td colspan="2" class="storytitle" id="post-<?php the_ID(); ?>"><a>" rel="bookmark"><?php the_title(); ?></a></td>
    </tr>
    <tr>
    <td colspan="4" class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?></td>
    </tr>
    <tr>
    <td colspan="4" class="storycontent"><?php the_content(__('(more...)')); ?></td>
    </tr>
    <tr>
    <td colspan="3" class="author"><nobr><?php the_author() ?> @ <?php the_time('H:i') ?> Uhr &nbsp; &nbsp; <?php edit_post_link(__('Edit This')); ?></nobr></td>
    <td class="feedback">&nbsp;<?php wp_link_pages(); ?> <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></td>
    </tr>
    </table>

    <?php comments_template(); // Get wp-comments.php template ?>

    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>

    </body>
    </html>

    Is there anything missing?

  4. XratedFozzibaer
    Member
    Posted 8 years ago #

    No solutions?

  5. XratedFozzibaer
    Member
    Posted 8 years ago #

    Please take a look!

  6. XratedFozzibaer
    Member
    Posted 8 years ago #

    OK,

    I moved the external sites php-file into the wp-folder.
    Now it works.

Topic Closed

This topic has been closed to new replies.

About this Topic