Question about selective display of menu item

Forums Forums Menus Question about selective display of menu item

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1642
    anthonyd
    Member

    Hi Ryan

    Have hunted through the forums and sadly I can’t seem to find an answer to this – possibly because it’s quote bespoke, but I thought I would ask.

    It’s an issue because I clearly can’t add any PHP code into the Custom Code section, so what I really need to do is the following:

    1. I am using an IP2LOC plugin which checks the user’s IP and determines where they are from in which case it will display content accordingly using the plugin’s short tags.
    2. One of my menu items is "STOCKISTS" which brings up a page (determined by the user’s location) and outputs content as to where they can buy their items from.
    3. There are certain countries that will only allow the user to buy from the site (through the eCommerce functionality) thereby rendering the STOCKISTS page useless

    So what I’m trying to do is have that nav item removed if the user is from one of these countries.

    The IP2LOC plugin is fairly straightforward, using shortcodes (eg., [IP2LOC:uk,au,us] display content [/IP2LOC] – so anything within these tags is displayed for the countries listed.

    Therefore, I have set up a custom code <li><a href="/stockists/">Stockists</li> within Pixopoint but I would like to know if there’s a way I can remove this based on the IP2LOC dependency.

    Eek! I hope that all made sense. Let me know if this is something that can be done/hardcoded into the template or requires a premium build?

    Cheers
    Ant

    #9113

    Hi,
    Sorry for the ridiculously long wait time before I have replied.

    I recommend custom building a plugin to do that, or simply incorporating the functionality into your theme.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.