WordPress.org

Ready to get started?Download WordPress

Forums

Openstrap
[resolved] Parent pages not clickable with new update (9 posts)

  1. InvisibLe019
    Member
    Posted 8 months ago #

    So as the title says...I accidentally updated openstrap theme, of course all my changes were deleted, but on top of that, now I can't click on parent pages to open them. It only works if I access from bottom menu, or I open them in new tab. This is my website http://www.tismitrovic.rs
    Any help is appreciated.

  2. rrentfro
    Member
    Posted 8 months ago #

    I'm also having the same issue with this theme and have yet to resolve it. I've updated two sites and they both have the same issue. Reviewing the openstrap demo it appears it's occurring on their site as well.

    I'm going to dig into the issue and resolve it sometime today and if I find a solution I'll post it here until the author makes an update.

  3. variuxdavid
    Member
    Posted 7 months ago #

    I was able to create a child theme and a new functions.php file (renamed the old on in the parent directory) and modify lines 644 and 645 with this:

    $attributes	.=	$args->has_children	? ' class=""' : ''; /*DE:1-22-14: removed class="dropdown-toggle"*/
    $attributes	.=	$args->has_children	? ' data-toggle=""' : ''; /**DE:1-22-14: removed data-toggle="dropdown"*/
  4. esmi
    Forum Moderator
    Posted 7 months ago #

    That is NOT how you are supposed to use a child theme. The parent theme's files should never be edited. The child theme's functions.php file should be empty apart from any customised or new functions.

  5. Pavan Solapure
    Member
    Theme Author

    Posted 7 months ago #

    The menus is updated as per the Twitter Bootstrap Framework. As per the framework purpose of main menu if it has sub-menu is to make way to the sub pages. Moreover earlier implementation were causing issues, on mobile version. The earlier on hover effect was not working properly in mobile and small devices. so we had to upgrade our menus as per that.

  6. resserpw
    Member
    Posted 7 months ago #

    I'm also having the same issue with this theme. Parent items are not working anymore. I've also updated two sites and they both have the same issue. Please solve the issue a.s.a.p.

  7. rrentfro
    Member
    Posted 7 months ago #

    Pavan - this was one of the details I found in regards to bootstrap and this issue - it may be of use to you or others.

    "Remove the data-toggle="dropdown" part.

    Now your dropdown menu should appear on hover and the parent menu items will be clickable as links."

    I have not verified if this works across mobile and other browsers but thought it was useful.

  8. Pavan Solapure
    Member
    Theme Author

    Posted 7 months ago #

    Hi All
    If you are open to Jquery solution then you can add following to your functions.php (line # 795)

    <script type='text/javascript'>
    jQuery(document).ready( function($) {
    	$("body").delegate("a.dropdown-toggle", "click", function(e) {
    		e.preventDefault();
    		$(location).attr('href', $(this).attr("href"));
    	});
    });
    </script>
  9. Pavan Solapure
    Member
    Theme Author

    Posted 7 months ago #

    I would not prefer removing data-toggle as hover effect is messing with menus when on mobile.

Reply

You must log in to post.

About this Theme

About this Topic