• Hi,

    I need help with a couple things. first off i am using the sensitive theme and the black nav menu at the top is good but i want to edit it. i want it so that it has the site title on left hand side of the bar and the actual menu on the right side of the bar, currently it is all to the left.

    secondly i have a main image in the center of the screen which was selected using the “homepage settings” tab in the theme options section. I want to make it so that i can click on the image and it will lead to another page / website (so basically hyperlink it)

    And lastly i would like it so that the menu at the top – where the drop down is, the drop down appears whe nyou click on the tab which in turn disables the tab completely. can i do it so that the menu appears by hovering over the tab and so that all buttons work.

    Kind regards and please help as soon as possible

    website is

    https://www.octagontelecom.com

    Thankyou

Viewing 1 replies (of 1 total)
  • First you’ll have to create a Child theme and activate it. Copy the wp-content/themes/sensitive/homepage-top.php to wp-content/themes/sensitive-child/

    Edit line 6 and place your anchor tags around <img

    Now for third one. Copy the header.php file and libs/nav-menu-walker.class.php file from the main theme and place it in the child theme directory (no need to create a “libs” directory here just place it in sensitive-child).

    Create a functions.php file inside wp-content/themes/sensitive-child/ and place the following code.

    <?php
    require_once(dirname(__FILE__)."/nav-menu-walker.class.php");

    The closing PHP tag ?> has been deliberately omitted. Edit the wp-content/themes/sensitive-child/nav-menu-walker.class.php file and change the name of the class on line 4. I added a _custom prefix to it.

    class sensitive_bootstrap_walker_nav_menu_custom extends Walker_Nav_Menu {

    Go to line 47 of this file and remove data-toggle="dropdown" so it should look like

    $attributes .= ($args->has_children&&$depth==0) ? ' class="dropdown-toggle"' : '';

    Save the file and open the header.php in the child theme go to line 41 and change the class name

    'walker' => new sensitive_bootstrap_walker_nav_menu_custom()

    Finally we need to place some CSS in the style.css of the Child theme to make the menu work on hover.

    /*
    Theme Name: Sensitive Child
    Template: sensitive
    */
    
    @import url('../sensitive/style.css');
    
    .dropdown:hover ul {
        display: block;
    }
    
    .nav-collapse.collapse {
        float: right;
    }
    
    .dropdown-menu {
        margin-top: 0;
    }

    This code fulfills your first requirement too!

Viewing 1 replies (of 1 total)
  • The topic ‘Customizing questions’ is closed to new replies.