• I’d really appreciate if someone could tell me what code to paste (and where to paste it) to add a “home” button to my primary navigation menu.

    I’m using the Parament theme on WordPress 3.3.1.

    I’m new to the code, and I saw code suggestions that should do this, and I tried pasting them into the functions file. I tried several, unfortunately none worked, and I’m guessing it’s due to my theme or where I pasted the suggested code.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Did you use the themes default menu or make your own?

    Thread Starter Bill823

    (@bill823)

    Everything is default. And I’d like to restore it to the default settings since apparently I messed something up — now I can’t even login!

    This is what I see after attempting to login:

    Warning: Cannot modify header information – headers already sent by (output started at /home/bill823/public_html/wp-content/themes/parament/functions.php:2) in /home/bill823/public_html/wp-login.php on line 349

    Warning: Cannot modify header information – headers already sent by (output started at /home/bill823/public_html/wp-content/themes/parament/functions.php:2) in /home/bill823/public_html/wp-login.php on line 361

    Warning: Cannot modify header information – headers already sent by (output started at /home/bill823/public_html/wp-content/themes/parament/functions.php:2) in /home/bill823/public_html/wp-includes/pluggable.php on line 669

    Warning: Cannot modify header information – headers already sent by (output started at /home/bill823/public_html/wp-content/themes/parament/functions.php:2) in /home/bill823/public_html/wp-includes/pluggable.php on line 670

    Warning: Cannot modify header information – headers already sent by (output started at /home/bill823/public_html/wp-content/themes/parament/functions.php:2) in /home/bill823/public_html/wp-includes/pluggable.php on line 671

    Warning: Cannot modify header information – headers already sent by (output started at /home/bill823/public_html/wp-content/themes/parament/functions.php:2) in /home/bill823/public_html/wp-includes/pluggable.php on line 866

    And here’s my WordPress site: https://from-my-wheelchair.com/

    Thank you for any help you can offer.

    Thread Starter Bill823

    (@bill823)

    Ok! Disregard the login problem, I searched WordPress and found a solution (I needed to remove a space from the top of the functions file referenced above, which I did by logging into my host, downloading the proper file, removing the space in notepad, and uploading the file again).

    I’d still appreciate help creating a “home” button link please.

    In the twenty eleven theme function.php there is a filter to show the home menu item, copy and use this filter and it will work, I have already changed the function name and tested the code.

    I’m new to the code, and I saw code suggestions that should do this, and I tried pasting them into the functions file.

    If you are going to change the theme it would be best to create a child theme and work with that.

    Edit Start
    I see you mention notepad, have a look at a syntax highlighted editor like Notepad++ and as you are windows check out InstantWP so you can work local, test before updating a production website.

    To create a child theme for this theme, create a folder then, add a file style.css

    /*
    Theme Name: Parament Child
    Description: Child theme for the parament theme
    Author: Your name here
    Template: parament
    */
    
    @import url("../parament/style.css");

    Then create a file functions.php file starting with a php tag

    <?php
    /**
     * Parament Child themes functions.php
     * Custom functions and over-rides go in here
    */
    
    /* Show Home Link in Menu */
    function my_page_menu_args( $args ) {
    	$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'my_page_menu_args' );

    Copy the screenshot.png from Parament to the child theme, make changes and activate!

    Any latout files you want to change you will then copy the file from the parent to the child, lets say changing the footer credits, copy footer.php across and make the change in the child theme.

    Back to the topic:
    To show the home link in the functions.php add:

    /* Show Home Link in Menu */
    function my_page_menu_args( $args ) {
    	$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'my_page_menu_args' );

    HTH

    David

    Thread Starter Bill823

    (@bill823)

    Thank you for replying David.

    I just read about the child theme creation and think I can do that.

    Once the child theme is activated, will it have its own functions file that I can edit?

    Where exactly do I paste the code you suggested?

    I’m new and learning. Thank you kindly.

    Bill

    Hi Bill,
    I have edited the reply above to give the child theme steps, do have a look at InstantWP and NotePad++ both free to download.

    HTH

    David

    Thread Starter Bill823

    (@bill823)

    Thank you David.

    I’ll try to implement this, but it will probably take me a while.

    No worries. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to add a "home" page link to Parament theme?’ is closed to new replies.