[WordPress Post Tabs]: Problems with Anchors
-
hello, i am trying to link from a button on my page to a specific tab on that page. i can build the anchor link no problem, (ex: #tabs-1149-0-5) and insert it into the following html code
p align="center"> <form action="#tabs-<?php echo $postid; ?>-0-<?php echo $tabnum?>"> <div> <button type="submit">Buy Now</button> </div> </form> </p>
and it only kind of works. When i click it the first time it takes me to the correct tab, but after that the button does nothing. if i switch tabs than click the button, it just stays on the new tab. The only time anything happens is if i reclick on the desired tab, then click the button, it will reload that same tab. any suggestions, including other ways to do it are greatly appreciated!
p.s. i know typically this would be solved with js but unfortunately im limited to php (The button is part of a sidebar widget and i am using PHP Code Widget Plugin, which only handle php, html and plain text)
- The topic ‘[WordPress Post Tabs]: Problems with Anchors’ is closed to new replies.