WordPress.org

Ready to get started?Download WordPress

Forums

index page isn't index.php but news.php (10 posts)

  1. francesca
    Member
    Posted 9 years ago #

    Hello here :)
    I have news.php with this code:
    <?php /* Don't remove this line, it calls the WP function files ! */
    $blog=1;
    $cat= 3;
    require_once("../.././wordpress2/wp-blog-header.php");
    ?>
    <!-- // loop start -->
    <?php foreach ($posts as $post) { start_wp(); ?>

    <div class="news">
    <h3 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h3>

    <?php the_content(); ?>
    <?php the_time("d/m/y"); ?>
    </div>

    <!-- // this is just the end of the motor - don't touch that line either :) -->
    <?php } ?>

    Now, I've just added the code for the archives

      <?php wp_get_archives('type=monthly'); ?>

    but there's a problem: the PHP code for the archive generates links as:
    http://www.domain.it/news.php/index.php?m=200406

    and obviously it doesn' work correctly.

    (In the general options I've "http://www.dominio.it/news.php" as the blog URI.)

    What should I do?
    thanx.

  2. TechGnome
    Moderator
    Posted 9 years ago #

    I'm going to go out on a limb and suggest that maybe the index.php could be a setting in the admin area. It could be set to index.php as a default, but over written by the user if they choose to do so.

    It's just a thought. I keep seeing people doing this, and wonder just how difficult would it be?

    Tg

  3. TechGnome
    Moderator
    Posted 9 years ago #

    FYI: I've added this to the bug tracker as a feature request:
    http://mosquito.wordpress.org/view.php?id=692

    Tg

  4. Anonymous
    Member
    Posted 9 years ago #

    I could have sworn it was possible in b2. Am I mad?

  5. Kafkaesqui

    Posted 9 years ago #

    Change the "blogfilename" field to news.php, which is available under a *triple top secret* options page:

    1.2.x:
    /wp-admin/options.php?option_group_id=6

    1.5:
    /wp-admin/options.php

    Note: this will change it for all WP-generated blog links.

  6. TechGnome
    Moderator
    Posted 9 years ago #

    And yet, note Matt's note here.....
    http://mosquito.wordpress.org/view.php?id=692

    Tg

  7. Kafkaesqui

    Posted 9 years ago #

    Hmm. Guess it depends on the meaning of the word "support." It is, after all, a field in the db, so it can be changed.

    Perhaps Matt meant for permalinks?

  8. Anonymous
    Member
    Posted 9 years ago #

    I'd guess it's a legacy feature from the old b2 code that Matt's forgotten because he didn't add it himself ;)

  9. francesca
    Member
    Posted 9 years ago #

    Thanks everybody!
    I've tried what Kafkaesqui suggested and I changed blogfilename to news.php but now all I get in the archive links is:
    http://www.domain.it/news.php/news.php?m=200412

  10. maccarrp
    Member
    Posted 8 years ago #

    The Static Front Page Plug-in
    http://www.semiologic.com/projects/static-front/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.