• On my new site the main top link of the menu when it has a drop down is not working.

    In this eg, the services for education and business items are not linking to their respective pages. Any ideas on how to fix this and what caused this would be appreciated.

    regards,
    Rob

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hi, this is the normal behaviour of the Customizr menu. This was done by design because when it has children, a top menu is often not clicked.
    You might desactivate this behaviour with a code snippet provided here : https://www.themesandco.com/customizr/faq/#menu

    Hope this will help, cheers

    See this snippet

    Theme Author presscustomizr

    (@nikeo)

    Hi @tomaja,
    You have been one of the most active contributers to the forum those last weeks. This is really appreciated!

    Would you be interested to share some snippets directly on themesandco.com?
    Feel free to contact me here : https://www.themesandco.com/contact

    Thank you @nikeo for such a great theme !
    It would be an honor for me, thanks again.

    Thread Starter robcnz

    (@robcnz)

    Hi @nikeo,

    I am trying this with my child theme CSS and functions.php files, but for some reason it isn’t working. I’ve checked I’m not copying a space or line number accidentally but when I put it into the functions.php file it breaks. I’m testing this on my local copy first ??

    Here’s the code in the functions.php file I have – wondering if something else is conflicting with this insertion?
    Rob

    <?php
    add_filter('tc_credits_display', 'my_custom_credits');
    function my_custom_credits(){
    echo '<div class="span4 credits">
        		    	<p><b> <a href="mailto:[email protected]?subject=Enquiry from web site">[email protected]</a> - +64 (0)21 590 572</b><br>&copy; '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> &middot; <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US"><img alt="Creative Commons License." title="All work on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License." style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" alt="All work on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License."/></a><br></p></div>';
    }
    
    function wpb_imagelink_setup() {
        $image_set = get_option( 'image_default_link_type' );
    
        if ($image_set !== 'none') {
            update_option('image_default_link_type', 'none');
        }
    }
    add_action('admin_init', 'wpb_imagelink_setup', 10);
    
    add_filter('tc_menu_display', 'acub_menu_display');
    function acub_menu_display($output) {
    	echo preg_replace('| class="dropdown-toggle" data-toggle="dropdown" data-target="#"(.+?)<b class="a-stripped"><a class="dropdown-toggle a-caret" href="#" data-toggle="dropdown" data-target="#"><b ',="" $output,="" -1);="" }<="" pre=""></a></b>
    Theme Author presscustomizr

    (@nikeo)

    Hi @robcnz,
    The function to enable the click is not closed with }.
    Quick tip : your first function code is a bit messy…You should use a simpler syntax. In php you can just temporarily close the flow, insert a clean html code (whithout echoing) and open it again after.
    Like this for example :

    function my_function() {
    ?>
    <!-- SOME HTML -->
    <?php
    }//end of function

    Hope this will help you find your way.
    Your review is great by the way

    I have the exact same problem…

    I tried to inactivate all my plugins, no difference, so there shouldn’t be anything else disturbing the functionality.

    I have not added or changed anything in functions.php apart from this… If I put the snippet in my child theme, nothing happens, if I put it in the original theme, it breaks… I’m not sure what I’m doing wrong?

    @funkan: If you require assistance then, as per the Forum Welcome, please post your own topic.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Main nav menu not linking’ is closed to new replies.