Support » Fixing WordPress » How to hide my home link in my menu just for a specific page

  • I want to know how can I hide the home link in menu just for a specific page? Currently I want to hide it from the default index.php of the twenty eleven theme. I don’t want to set show_home to false in functions.php nor removing it from header because I still want to use it in other pages. Any ideas how can I do this?

Viewing 14 replies - 1 through 14 (of 14 total)
  • esmi

    (@esmi)

    Forum Moderator

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.

    so I must not edit any file or add any script in the theme? And I must copy a new theme same as that and there I do editing, etc?

    esmi

    (@esmi)

    Forum Moderator

    so I must not edit any file or add any script in the theme?

    Correct.

    And I must copy a new theme same as that and there I do editing, etc?

    Almost. Please see the link I posted above. Only your changes are added to the child theme.

    1. What if I want to edit the index.php?
    2. What if I want to add a like new.php?
    3. What if I want to have my own directory contains js/css?

    esmi

    (@esmi)

    Forum Moderator

    1. Create a customised copy of that file in the child theme.
    2 Like new.php?
    3. sounds like you need to create a new standalone theme.

    I was able to understand now, so if I want to update the code of index.php I will just create a copy of index.php in the child theme and there I do editing.

    Lastly in creating a new page I just create a new php file inside the theme and put /*Template Name: Sample*/ and add new page named Sample in the admin ui. And example I have my own js scripts I just put a new folder in example wwwroot/myJSFiles and import the js files in themes header.php example <script type=”text/javascript”>myJSFILES/sample.js</script>. Is this right?

    Thanks you for helping me out I am just new In wordpress 🙂 really appreciated it now I know what should I do and what will I need to learn in WP. 🙂

    esmi

    (@esmi)

    Forum Moderator

    so if I want to update the code of index.php I will just create a copy of index.php in the child theme and there I do editing.

    Correct.

    If you want a new custom page template, then you just create it in the child theme, yes. With regard to new javascripts, you would need to enqueue them via your child’s functions.php

    btw in your given link I didn’t see a sample header for php files? it’s just for css files.

    I don’t need a copy of header.php in my child theme? eventhough I add new line of on it like <script src=”etc”></script>?

    this is the last for sure. I usually use bootstrap plugin and it contains many files in a folder. What is the right way to put it in the theme and how can I use this?.

    Hi there,

    I think you need a copy of header.php in your child theme. Esmi’s link is just to explain how to include js or css files into your header.php. Don’t write <script src=”etc”></script> directly in your theme as this may cause conflicts. Use the enqueue Esmi mentioned.

    Regards.

    What is the header for .php file in child? And it is still ok if i edit the theme from admin from theme customize link?

    Thank you! 🙂

    header.php 🙂

    i usually use twitter bootstrap plugin, where should I put it and how can use it??????

    Not sure about the twitter bootstrap plugin. For installing plugins, check http://codex.wordpress.org/Managing_Plugins

    hmmm now for the main problem what css I can use to hide the HOme in menu in my index.php?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How to hide my home link in my menu just for a specific page’ is closed to new replies.