Thx for a super plugin! So far it works like a charm. I managed to make a gif on my page to be a popup when clicked on. Now I want to do the same with li-items in a custom menubar of mine… HOW can I do this?
I tried to wrap the shortcode into the html-code, but no luck… I’m quite a novise to web-coding, som I’m sure I’ve missed out on something very relevant, but would appreciate the help, if this is possible!
P.s: Did the bloke wrestle the Alligator yet?
What code are you using for your menubar & where are you putting it? Also a link to your site might help. If I can see what you’re trying to achieve, I should be able to work out whether it is possible either with the plugin as it is, or with a modification.
re the ps: I’ve not heard from him for a few days so he’s either still planning the bout or it has taken place and he was the runner-up.
The site I’m building is confidential until the launch, but this is the menubar-code:
<div id="menubar"> <ul> <li><a href="http://mmysite.com/about/">about</a></li> <li><a href="http://www.mysite.com/contact/">contact</a></li> <li><a href="[popup url="http://www.mmysite.com/login/" height="475" width="460"][/popup]">login</a></li> </ul> </div><!--menubar-->
Hope this will give u some insight 🙂
I’m building it for a customer, and I’ve signed a confidentiality agreement…
The shortcode puts in the anchor tag & the syntax dictates that the link text needs to be between the opening & closing parts of the shortcode, so you don’t need to specify these outside of the shortcode.
If you are putting this markup into page/post content, the syntax should be slightly different to what you are trying to use. I’ve not tested it, but try this instead
<div id="menubar"> <ul> <li><a href="http://mmysite.com/about/">about</a></li> <li><a href="http://www.mysite.com/contact/">contact</a></li> <li>[popup url="http://www.mmysite.com/login/" height="475" width="460"]login[/popup]"></li> </ul> </div><!--menubar-->
If you are instead putting it into a php file in your theme such as a template, it will be a little more fiddly. Let me know if that is the case – I should be able to suggest some code using the do_shortcode() function or an alternative method
I’m putting into template-files, and that is why I struggle…
I would be glad if u are able to help me figure this out though. I’m new to this, and even though I’ve had a steep learning curve from zero to some (I started this a few weeks ago), I’m not at all familiar with how and when to use the function-codes.
I want the buttons in this custom menubar to open the popup-window when clicked on. I’ve created a template for almost all my custom pages, and the menubar in question is part of several of them. The template is based on the page.php.
Thx ever so much for your help!
P.s: Hope the alligator-wrestler is alive and kicking 😛
I tried your code but this is what shows in the browser: http://www.mysite.com/'%5Bpopup%20url=
and the message on the page says “nothing was found”…. so I probably will need to use some other method 😉
Shortcodes won’t work if added to a template file like this, so it is not unexpected that it didn’t work.
As this is to go into the template it probably best to avoid the overhead of using the shortcode. Instead you can add the html link using the same syntax that the shortcode would output. If the parameters are the same it will allow the jQuery to make the popup in the same way as using the shortcode in a page.
<div id="menubar"> <ul> <li><a href="http://mmysite.com/about/">about</a></li> <li><a href="http://www.mysite.com/contact/">contact</a></li> <li><a href="http://www.mmysite.com/login/" class="popup" data-height="475" data-width="460">login</a></li> </ul> </div><!--menubar-->
The jQuery added by the plugin is triggered by the ‘popup’ class and the data-attributes pass the values for width & height.
I don’t know what theme you are using so I cannot test this, but I think this should work in most cases.
You are an angel! That worked like a charm 🙂
I’m making my own theme for this customer based on: _s-hteme from ThemeShaper 🙂
Thx ever so much for your time and for helping me! It saved me many an hour of trying and failing 🙂
Have a really nice weekend 🙂
Great! – Glad it worked for you.
If you’d like to leave a review for the plugin, that would be appreciated.
Cubecolor, I would love to ask you another question. Where can I do this?
I might have another “alligator-challange” for you 😉
If its regarding some specific custom work you would like to commission, that kind of conversation doesn’t take place on the forums, but you can send me a message via the contact form on my own website.
Otherwise for free help it would be best to start a new thread in the relevant forum.
If your question is related to alligator popup or one of my other plugins, the plugin’s forum would be the best place. If you want WordPress support with something unrelated to any specific plugin, it would probably be best to ask in the how-to & troubleshooting forum where any forum volunteer would be able to pitch in.
- The topic ‘Make menu-item refer to popup’ is closed to new replies.