WordPress.org

Ready to get started?Download WordPress

Forums

rename _index.php to index.php causes a change the output (2 posts)

  1. lukasik
    Member
    Posted 2 years ago #

    If I view _index.php with standard code

    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');

    I get this output

    <html lang="cs" xml:lang="cs" xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <body>
    <div id="body">
    
    <div id="footer">
    </body>
    </html>

    and the other elements are inside the main div #body
    but if I rename it to index.php I get different output

    <html lang="cs" xml:lang="cs" xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <body>
    <div id="body">
    <div id="posledni-headline">
    <div id="najcitanejsi">
    <div id="najdiskutovanejsi">
    <div id="widget">
    
    <div id="footer">
    </body>
    </html>

    these divs shoud be inside the #body

  2. lukasik
    Member
    Posted 2 years ago #

    i found issue:
    if!(is_home()) { echo "<div ..>";}

Topic Closed

This topic has been closed to new replies.

About this Topic