WordPress.org

Ready to get started?Download WordPress

Forums

admin bar somehow gets to the main page and changes it's location (2 posts)

  1. al_mac
    Member
    Posted 2 years ago #

    <?php get_header(); ?>
    
        <div id="content">
    	<!-- NEWS POST -->
    	<?php if ( have_posts() ) : ?>
    		<?php while ( have_posts() ) : the_post(); ?>
    			<?php get_template_part( 'loop', 'index' ); ?>
    		<?php endwhile; ?>
    	<?php endif; ?>
        </div>
    
    <?php get_footer(); ?>

    This is the code I've got in index.php. And when anything is added to the loop.php, admin bar (to be more precise, it's right part with 'Howdy admin' and Search field) gets to the page as html tags with these code:

    <script type='text/javascript' src='http://127.0.0.1:8888/wordpress/wp-includes/js/admin-bar.js?ver=20111130'></script>
    		<div id="wpadminbar" class="nojq nojs" role="navigation">
    			<div class="quicklinks">
    				<ul id="wp-admin-bar-root-default" class="ab-top-menu">
    		<li id="wp-admin-bar-wp-logo" class="menupop"><a class="ab-item" tabindex="10" aria-haspopup="true" href="http://127.0.0.1:8888/wordpress/wp-admin/about.php" title="About WordPress"><span class="ab-icon"></span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-wp-logo-default" class="ab-submenu">
    		<li id="wp-admin-bar-about" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/about.php">About WordPress</a>		</li></ul><ul id="wp-admin-bar-wp-logo-external" class="ab-sub-secondary ab-submenu">
    
    		<li id="wp-admin-bar-wporg" class=""><a class="ab-item" tabindex="10" href="http://wordpress.org">WordPress.org</a>		</li>
    		<li id="wp-admin-bar-documentation" class=""><a class="ab-item" tabindex="10" href="http://codex.wordpress.org">Documentation</a>		</li>
    		<li id="wp-admin-bar-support-forums" class=""><a class="ab-item" tabindex="10" href="http://wordpress.org/support/">Support Forums</a>		</li>
    		<li id="wp-admin-bar-feedback" class=""><a class="ab-item" tabindex="10" href="http://wordpress.org/support/forum/requests-and-feedback">Feedback</a>		</li></ul></div>		</li>
    
    		<li id="wp-admin-bar-site-name" class="menupop"><a class="ab-item" tabindex="10" aria-haspopup="true" href="http://127.0.0.1:8888/wordpress/wp-admin/">Система управления новостями</a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-site-name-default" class="ab-submenu">
    		<li id="wp-admin-bar-dashboard" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/">Dashboard</a>		</li></ul><ul id="wp-admin-bar-appearance" class=" ab-submenu">
    		<li id="wp-admin-bar-themes" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/themes.php">Themes</a>		</li></ul></div>		</li>
    		<li id="wp-admin-bar-updates" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/update-core.php" title="1 Plugin Update"><span class="ab-icon"></span><span class="ab-label">1</span></a>		</li>
    		<li id="wp-admin-bar-comments" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/edit-comments.php" title="0 comments awaiting moderation"><span class="ab-icon"></span><span id="ab-awaiting-mod" class="ab-label awaiting-mod pending-count count-0">0</span></a>		</li>
    
    		<li id="wp-admin-bar-new-content" class="menupop"><a class="ab-item" tabindex="10" aria-haspopup="true" href="http://127.0.0.1:8888/wordpress/wp-admin/post-new.php" title="Add New"><span class="ab-icon"></span><span class="ab-label">New</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-new-content-default" class="ab-submenu">
    		<li id="wp-admin-bar-new-post" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/post-new.php">Post</a>		</li>
    		<li id="wp-admin-bar-new-media" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/media-new.php">Media</a>		</li>
    		<li id="wp-admin-bar-new-link" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/link-add.php">Link</a>		</li>
    		<li id="wp-admin-bar-new-page" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/post-new.php?post_type=page">Page</a>		</li>
    
    		<li id="wp-admin-bar-new-user" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/user-new.php">User</a>		</li></ul></div>		</li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu">
    		<li id="wp-admin-bar-search" class=" admin-bar-search"><div class="ab-item ab-empty-item" tabindex="-1"><form action="http://127.0.0.1:8888/wordpress/" method="get" id="adminbarsearch"><input class="adminbar-input" name="s" id="adminbar-search" tabindex="10" type="text" value="" maxlength="150" /><input type="submit" class="adminbar-button" value="Search"/></form></div>		</li>
    		<li id="wp-admin-bar-my-account" class="menupop with-avatar"><a class="ab-item" tabindex="10" aria-haspopup="true" href="http://127.0.0.1:8888/wordpress/wp-admin/profile.php" title="My Account">Howdy, admin<img alt='' src='http://1.gravatar.com/avatar/5346cb94495758e33e6877f0ef639606?s=16&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D16&r=G' class='avatar avatar-16 photo' height='16' width='16' /></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-user-actions" class=" ab-submenu">
    		<li id="wp-admin-bar-user-info" class=""><a class="ab-item" tabindex="-1" href="http://127.0.0.1:8888/wordpress/wp-admin/profile.php"><img alt='' src='http://1.gravatar.com/avatar/5346cb94495758e33e6877f0ef639606?s=64&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D64&r=G' class='avatar avatar-64 photo' height='64' width='64' /><span class='display-name'>admin</span></a>		</li>
    		<li id="wp-admin-bar-edit-profile" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-admin/profile.php">Edit My Profile</a>		</li>
    
    		<li id="wp-admin-bar-logout" class=""><a class="ab-item" tabindex="10" href="http://127.0.0.1:8888/wordpress/wp-login.php?action=logout&_wpnonce=c72de8b413">Log Out</a>		</li></ul></div>		</li></ul>			</div>
    		</div>

    Does anyone know the cause of the problem?

  2. al_mac
    Member
    Posted 2 years ago #

    I've found how to solve the problem: there must be an unordered list inside the loop.php and nothing else is allowed as far as I understand.

Topic Closed

This topic has been closed to new replies.

About this Topic