Tagged: x
-
AuthorPosts
-
December 20, 2016 at 6:45 am #1299281
wtParticipantHello there,
I created a front page for my news blogs. I want this page to be accessed only on desktops and laptops while my blog news category will be accessed on mobile instead. Is there anyway to achieve this? I mean, I want the “News” menu item to link to the page I created on desktops and laptops only, while the “News” menu redirects to the “News category” on mobile devises? I appreciate any help on this please?
Thanks so much!December 20, 2016 at 6:47 am #1299283
wtParticipantThis reply has been marked as private.December 20, 2016 at 7:05 am #1299299
wtParticipantThis reply has been marked as private.December 20, 2016 at 7:23 am #1299307
Paul RModeratorHi,
Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!
December 20, 2016 at 10:49 pm #1300121
wtParticipantI tried to create two menus one for mobile one for desktop to solve this issue. I was searching for the forum and got this thread https://community.theme.co/forums/topic/is-it-possible-to-have-two-menus-one-for-mobile-and-one-for-desktop/ and tried to use it. But for some reason the secondary menu spread vertically below the primary menu. Can someone help? I have attached a screenshot here.
Thanks!December 21, 2016 at 2:29 am #1300238
LelyModeratorHello There,
Thank you for the screenshot. Please add the CSS too. That will hide the other menu on desktop. To help you better, please share your site URL.
December 21, 2016 at 2:55 am #1300257
wtParticipantHello Lely,
Thanks so much for the response. URL: https://ethiobook.netI have added the codes as follows:
1. In the X child theme’s functions.php I added
//Register Navigations
add_action( ‘init’, ‘my_custom_menus’ );
function my_custom_menus() {
register_nav_menus(
array(
‘primary-menu’ => __( ‘Primary Menu’ ),
‘secondary-menu’ => __( ‘Secondary Menu’ )
)
);
}2. In the Header.php I added
<?php wp_nav_menu (array(‘theme_location’ => ‘primary-menu’,’menu_class’ => ‘nav’));?>
<?php wp_nav_menu (array(‘theme_location’ => ‘secondary-menu’,’menu_class’ => ‘nav’));?>3. In the footer.php I added
<?php wp_nav_menu (array(‘theme_location’ => ‘primary-menu’,’menu_class’ => ‘nav’));?>
<?php wp_nav_menu (array(‘theme_location’ => ‘secondary-menu’,’menu_class’ => ‘nav’));?>4. In the custom CSS I added:
@media screen and (max-width: 980px){
#secondary-menu {
display: block;
}
}I don’t really know what’s wrong here.
Thanks!
December 21, 2016 at 3:23 am #1300276
LelyModeratorHello There,
You have defined #secondary-menu ID but then it is not added on your menu. Please look for this line of code:
<?php wp_nav_menu (array('theme_location' => 'secondary-menu','menu_class' => 'nav'));?>
Update to this:
<?php wp_nav_menu (array('theme_location' => 'secondary-menu','menu_class' => 'nav','menu_id' => 'secondary-menu'));?>Hope this helps.
December 21, 2016 at 4:09 am #1300304
wtParticipantHello Lely,
Thanks for the response. However I replaced the code but the issue still there.
Thanks!December 21, 2016 at 4:11 am #1300305
wtParticipantI replaced in both header.php & footer.php files.
December 21, 2016 at 4:45 am #1300348
LelyModeratorHello There,
Upon checking, your site source code, the ID on the menu is not added yet. I can see you have caching, please clear cache to generate update content. Then also check the following part on your custom CSS:
/*Feature box title customizer for small ipods & cell-phones @media (max-width:767px){ .x-feature-box-title { font-size: 12px; line-height:1; } } /*Feature box text customizer for small ipods & cell-phones @media (max-width:767px){ .x-feature-box-text { font-size: 12px; line-height:1; } }Please update this line:
/*Feature box text customizer for small ipods & cell-phones
To this:
/*Feature box text customizer for small ipods & cell-phones*/
Incorrect comment will cause CSS syntax error and this will stop other CSS below this error from working. Clear cache again after this CSS update.Hope this helps.
December 21, 2016 at 5:03 am #1300370
wtParticipantDear Lely,
Thanks so much for checking the sites source code. I checked and corrected all comment errors and cleared all cache. However the issue is still there.
Thanks so much for the help.December 21, 2016 at 5:11 am #1300375
wtParticipantI can give you the credentials if you need it too.
December 21, 2016 at 5:16 am #1300377
ChristopherModeratorHi there,
The secondary menu is displaying on your site, but you need some CSS to style it.
Please add following code to hide it on desktop :@media (min-width:979px){ .menu-secondary-container { display: none; } } @media (max-width:979px){ .x-navbar-wrap{ display:none; } }Hope it helps.
December 21, 2016 at 5:29 am #1300384
wtParticipantThanks Christopher for the help,
The code hides the menu on desktop. However the issue is still there on mobile view. Can you please help?
Thanks! -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1299281 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
