简体   繁体   中英

How to omit index.php in Wordpress?

Is there any possibility to omit the index.php in Wordpress? My projects works using only pages (page.php) and I'm using Lingotek for having multiples languages.

  1. If I type http://project/en/ should display the Front Page but it doesn't display anything. (I want to fix this)

  2. If I type http://project/ goes directly to http://project/en/home

My idea it was to redirect through index.php directly to the Front Page. What would you do?

in your index.php you can call your page 'home':

<?php get_header(); ?>

    <?php $query = new WP_Query('pagename=home'); if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); ?>

        <?php the_content();?>

    <?php } } wp_reset_postdata(); ?>

<?php get_footer(); ?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM