• Resolved SwMy

    (@swmy)


    https://vedantadc.org

    The “home” tab appears twice. The relevant code from the header seems to be:

    <div id="menu">
    	<ul>
    		<li class="<?php if ( is_home() ) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>"><?php _e('Home'); ?></a></li>
    		<?php wp_list_pages('sort_column=id&depth=1&title_li='); ?>
    	</ul>
    </div>

    Sorry, I can’t code, but would be grateful for a fix for this…

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you want the second Home removed, remove this <li class="page_item page-item-7 current_page_item"><a href="https://vedantadc.org" title="Home">Home</a></li> from div id=”menu”

    Thread Starter SwMy

    (@swmy)

    yes, that would do it, sure, except that the div id=”menu” in which this appears is generated by the code which I pasted in the first post. So that code needs to be tweaked to stop generating two home tabs.

    Any more ideas?

    Thread Starter SwMy

    (@swmy)

    Also, it’s funny, the first home tab is a little different. It doesn’t have “hover” text, and doesn’t change when the home page is open. It is the second home tab that does all that. So I would want to delete the first home tab, and move the second one to the first position. But how?! I’ll be grateful for further assistance…

    Yes, I noticed that also. I am messing with the code but PHP is my weakness – sorry.

    Thread Starter SwMy

    (@swmy)

    Solved, code now reads:

    <div id="menu">
    	<ul>
    		<li class="<?php if ( is_home() ) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"></a></li>
    		<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    	</ul>
    </div>
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Home tab appears twice’ is closed to new replies.