Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Genestoy Posted September 12, 2017 Posted September 12, 2017 I am using the code below to remove the "Start New Topic" on the main index page and just discovered that it does not remove it on the mobile version? Anyone know what I need to add to it to accomplish the mobile removal? Thanks .ipsPageHeader.cForumHeader h1, .ipsPageHeader.cForumHeader .ipsToolList > li:first-child {display: none; }
DesignzShop Posted September 12, 2017 Posted September 12, 2017 @media screen and (max-width: 768px) { .ipsPageHeader.cForumHeader h1, .ipsPageHeader.cForumHeader .ipsToolList > li:first-child {display: none; } }
Brian A. Posted September 12, 2017 Posted September 12, 2017 Hello, 6 minutes ago, DesignzShop said: @media screen and (max-width: 768px) { .ipsPageHeader.cForumHeader h1, .ipsPageHeader.cForumHeader .ipsToolList > li:first-child {display: none; } } That won't work either because the 'Start new topic' is outside of the page header in mobile devices. Replace that code with this new one: .ipsPageHeader.cForumHeader h1, .ipsPageHeader.cForumHeader .ipsToolList > li:first-child, .ipsPageHeader.cForumHeader ~ .ipsToolList.ipsToolList_horizontal:first-of-type { display: none !important; } This has been tested and if it conflicts with something, please let me know.
Genestoy Posted September 12, 2017 Author Posted September 12, 2017 Thanks guys but I forgot to mention this is for 4.1.9 and does not work for that version?
Brian A. Posted September 12, 2017 Posted September 12, 2017 14 minutes ago, Genestoy said: Thanks guys but I forgot to mention this is for 4.1.9 and does not work for that version? You're welcome, and okay. Try this one instead: body[data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsPageHeader h1, body[data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsPageHeader .ipsToolList li, body[data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="index"] .ipsPageHeader ~ .ipsToolList.ipsToolList_horizontal:first-of-type { display: none !important; } If it doesn't work, then the selectors for targeting is wrong because I don't remember how the 4.1 template look like. As that being said, drop your website URL if it doesn't work so I can take a look further.
Brian A. Posted September 13, 2017 Posted September 13, 2017 I just forgot that code will conflict with other sections of the page that has the class (.ipsPageHeader). I've just edited my post. 6 minutes ago, Genestoy said: THANK YOU! that worked!! You're welcome. That's great!
Genestoy Posted September 13, 2017 Author Posted September 13, 2017 THANKS AGAIN! That revised code seems to be working just fine for both 4.1 and 4,2
Recommended Posts
Archived
This topic is now archived and is closed to further replies.