Magento 2 Hide top navigation links on Desktop ViewLayered navigation doesn't appear in mobile view (Magento 2)Magento 2 : Change Top Menu Alignment from Vertical to HorizontalMagento 2 call static block in the top menu navigationMagento 2 hide links in my account page conditionallyMagento2 Layout move element only for desktop view?Magento 2 : How to use Default Menu in Mobile view?Magento 2: Adding Products to Top NavigationHow to show/hide shared catalog enabled categories in layered navigation in Magento 2?How to customise category top menu navigation by custom category id in Magento 2?Magento 2 - Different menu for Mobile theme

Does the rule that you cannot willingly end your move in another creature's space force or prevent certain actions?

PhD advisor lost funding, need advice

How far did Gandalf and the Balrog drop from the bridge in Moria?

How much can I judge a company based on a phone screening?

Is it okay for a ticket seller to grab a tip in the USA?

Can the IPA represent all languages' tones?

Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?

What are those bumps on top of the Antonov-225?

If clocks themselves are based on light signals, wouldn't we expect the measured speed of light to always be the same constant?

Markov-chain sentence generator in Python

Are differences between uniformly distributed numbers uniformly distributed?

The cat exchanges places with a drawing of the cat

In which case does the Security misconfiguration vulnerability apply to?

Super Duper Vdd stiffening required on 555 timer, what is the best way?

Do I have to cite common CS algorithms?

Heating Margarine in Pan = loss of calories?

The cat ate your input again!

Can sampling rate be a floating point number?

Programming of ICs in general (MCU / FPGA / Serdes IC)

Why is there a large performance impact when looping over an array over 240 elements?

What was the opinion of Kumarila and Prabhakara about the Puranas?

Do beef farmed pastures net remove carbon emissions?

crippling fear of hellfire &, damnation, please help?

Why aren’t there water shutoff valves for each room?



Magento 2 Hide top navigation links on Desktop View


Layered navigation doesn't appear in mobile view (Magento 2)Magento 2 : Change Top Menu Alignment from Vertical to HorizontalMagento 2 call static block in the top menu navigationMagento 2 hide links in my account page conditionallyMagento2 Layout move element only for desktop view?Magento 2 : How to use Default Menu in Mobile view?Magento 2: Adding Products to Top NavigationHow to show/hide shared catalog enabled categories in layered navigation in Magento 2?How to customise category top menu navigation by custom category id in Magento 2?Magento 2 - Different menu for Mobile theme






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I need to hide magento 2 store top navigation menu from the desktop view but visible on mobile view. How can this be done ?










share|improve this question
























  • can you add picture of top navigation links.

    – user4536
    Aug 2 at 4:30











  • Did you resolve your issue?

    – Shoaib Munir
    Aug 2 at 11:59











  • @ShoaibMunir i have solved this issue.

    – ashanr
    yesterday











  • If your solution is different than my answer, I would suggest you add it in answer so that it would helpful for others in future

    – Shoaib Munir
    yesterday

















0















I need to hide magento 2 store top navigation menu from the desktop view but visible on mobile view. How can this be done ?










share|improve this question
























  • can you add picture of top navigation links.

    – user4536
    Aug 2 at 4:30











  • Did you resolve your issue?

    – Shoaib Munir
    Aug 2 at 11:59











  • @ShoaibMunir i have solved this issue.

    – ashanr
    yesterday











  • If your solution is different than my answer, I would suggest you add it in answer so that it would helpful for others in future

    – Shoaib Munir
    yesterday













0












0








0








I need to hide magento 2 store top navigation menu from the desktop view but visible on mobile view. How can this be done ?










share|improve this question














I need to hide magento 2 store top navigation menu from the desktop view but visible on mobile view. How can this be done ?







magento2 luma-theme






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 2 at 4:22









ashanrashanr

387 bronze badges




387 bronze badges















  • can you add picture of top navigation links.

    – user4536
    Aug 2 at 4:30











  • Did you resolve your issue?

    – Shoaib Munir
    Aug 2 at 11:59











  • @ShoaibMunir i have solved this issue.

    – ashanr
    yesterday











  • If your solution is different than my answer, I would suggest you add it in answer so that it would helpful for others in future

    – Shoaib Munir
    yesterday

















  • can you add picture of top navigation links.

    – user4536
    Aug 2 at 4:30











  • Did you resolve your issue?

    – Shoaib Munir
    Aug 2 at 11:59











  • @ShoaibMunir i have solved this issue.

    – ashanr
    yesterday











  • If your solution is different than my answer, I would suggest you add it in answer so that it would helpful for others in future

    – Shoaib Munir
    yesterday
















can you add picture of top navigation links.

– user4536
Aug 2 at 4:30





can you add picture of top navigation links.

– user4536
Aug 2 at 4:30













Did you resolve your issue?

– Shoaib Munir
Aug 2 at 11:59





Did you resolve your issue?

– Shoaib Munir
Aug 2 at 11:59













@ShoaibMunir i have solved this issue.

– ashanr
yesterday





@ShoaibMunir i have solved this issue.

– ashanr
yesterday













If your solution is different than my answer, I would suggest you add it in answer so that it would helpful for others in future

– Shoaib Munir
yesterday





If your solution is different than my answer, I would suggest you add it in answer so that it would helpful for others in future

– Shoaib Munir
yesterday










1 Answer
1






active

oldest

votes


















1














There are two different ways to do this.



One with CSS



Add media query and hide from desktop while display:block in mobile



.Your_Class
display:none;

@media only screen and (max-width: 600px)
.Your_Class
display:block;




The other way is by php mobile device check.



Add a helper function in any of your module



in any helper add isMobile function app/code/Vendor/Module/Helper/Data.php



<?php

namespace VendorModuleHelper;
use MagentoFrameworkAppHelperAbstractHelper;

class Data extends AbstractHelper

public function isMobile()hosin



This function will check if customer is visiting from mobile or desktop



Now use this function in your phtml like this:



<?php $isMobile = $this->helper('VendorModuleHelperData')->isMobile(); ?>
<?php if($isMobile) ?>
<?php //Call mobile menu here ?>
<?php ?>





share|improve this answer



























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284152%2fmagento-2-hide-top-navigation-links-on-desktop-view%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    There are two different ways to do this.



    One with CSS



    Add media query and hide from desktop while display:block in mobile



    .Your_Class
    display:none;

    @media only screen and (max-width: 600px)
    .Your_Class
    display:block;




    The other way is by php mobile device check.



    Add a helper function in any of your module



    in any helper add isMobile function app/code/Vendor/Module/Helper/Data.php



    <?php

    namespace VendorModuleHelper;
    use MagentoFrameworkAppHelperAbstractHelper;

    class Data extends AbstractHelper

    public function isMobile()hosin



    This function will check if customer is visiting from mobile or desktop



    Now use this function in your phtml like this:



    <?php $isMobile = $this->helper('VendorModuleHelperData')->isMobile(); ?>
    <?php if($isMobile) ?>
    <?php //Call mobile menu here ?>
    <?php ?>





    share|improve this answer





























      1














      There are two different ways to do this.



      One with CSS



      Add media query and hide from desktop while display:block in mobile



      .Your_Class
      display:none;

      @media only screen and (max-width: 600px)
      .Your_Class
      display:block;




      The other way is by php mobile device check.



      Add a helper function in any of your module



      in any helper add isMobile function app/code/Vendor/Module/Helper/Data.php



      <?php

      namespace VendorModuleHelper;
      use MagentoFrameworkAppHelperAbstractHelper;

      class Data extends AbstractHelper

      public function isMobile()hosin



      This function will check if customer is visiting from mobile or desktop



      Now use this function in your phtml like this:



      <?php $isMobile = $this->helper('VendorModuleHelperData')->isMobile(); ?>
      <?php if($isMobile) ?>
      <?php //Call mobile menu here ?>
      <?php ?>





      share|improve this answer



























        1












        1








        1







        There are two different ways to do this.



        One with CSS



        Add media query and hide from desktop while display:block in mobile



        .Your_Class
        display:none;

        @media only screen and (max-width: 600px)
        .Your_Class
        display:block;




        The other way is by php mobile device check.



        Add a helper function in any of your module



        in any helper add isMobile function app/code/Vendor/Module/Helper/Data.php



        <?php

        namespace VendorModuleHelper;
        use MagentoFrameworkAppHelperAbstractHelper;

        class Data extends AbstractHelper

        public function isMobile()hosin



        This function will check if customer is visiting from mobile or desktop



        Now use this function in your phtml like this:



        <?php $isMobile = $this->helper('VendorModuleHelperData')->isMobile(); ?>
        <?php if($isMobile) ?>
        <?php //Call mobile menu here ?>
        <?php ?>





        share|improve this answer













        There are two different ways to do this.



        One with CSS



        Add media query and hide from desktop while display:block in mobile



        .Your_Class
        display:none;

        @media only screen and (max-width: 600px)
        .Your_Class
        display:block;




        The other way is by php mobile device check.



        Add a helper function in any of your module



        in any helper add isMobile function app/code/Vendor/Module/Helper/Data.php



        <?php

        namespace VendorModuleHelper;
        use MagentoFrameworkAppHelperAbstractHelper;

        class Data extends AbstractHelper

        public function isMobile()hosin



        This function will check if customer is visiting from mobile or desktop



        Now use this function in your phtml like this:



        <?php $isMobile = $this->helper('VendorModuleHelperData')->isMobile(); ?>
        <?php if($isMobile) ?>
        <?php //Call mobile menu here ?>
        <?php ?>






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 2 at 4:29









        Shoaib MunirShoaib Munir

        5,7616 gold badges24 silver badges71 bronze badges




        5,7616 gold badges24 silver badges71 bronze badges






























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284152%2fmagento-2-hide-top-navigation-links-on-desktop-view%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

            Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

            Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림