WordPress.org

Ready to get started?Download WordPress

Forums

How to hide my home link in my menu just for a specific page (15 posts)

  1. wp_newbie_01
    Member
    Posted 1 year ago #

    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?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  3. wp_newbie_01
    Member
    Posted 1 year ago #

    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?

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  5. wp_newbie_01
    Member
    Posted 1 year ago #

    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?

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  7. wp_newbie_01
    Member
    Posted 1 year ago #

    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. :)

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    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

  9. wp_newbie_01
    Member
    Posted 1 year ago #

    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?.

  10. codingpet
    Member
    Posted 1 year ago #

    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.

  11. wp_newbie_01
    Member
    Posted 1 year ago #

    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! :)

  12. codingpet
    Member
    Posted 1 year ago #

    header.php :)

  13. wp_newbie_01
    Member
    Posted 1 year ago #

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

  14. codingpet
    Member
    Posted 1 year ago #

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

  15. wp_newbie_01
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.