Sidebartabs embedding weirdness.
-
So.. i have this code that i wanted to use to get sidebar tabs into wordspress. No other reason behind it but to get the sidebar with a simple script from external file. Incase no one knows how to help me my next attempt will be jquery tabs… :/
This code im using also uses jquery..
Anyways.. first thing i noticed was that the jquery effects were showing but the script was bumeranging back at me with the same content as it last had.. so i went ahead and i implemented the same exact code into blank html file where it worked.. no surprise there really..
So i went back to wp and tried to use static url for the sidebar links.. turns out it semi works.. you see sidebars that had basically nothing in them except some basic html were just fine and opened without hesitation. However.. sidebar that had quite normal sidebar functions like <?php wp_list_pages(); ?> and so on.. said this
“Fatal error: Call to undefined function wp_list_pages() in C:\xampp\xampplite\htdocs\wordpress\wp-content\themes\newtheme\sidebar1.php on line 8”
( every function said this.. )
This doesnt happen normally when you include the sidebar straight to wordpress.
Heres the code for the javascript (the third link in the code is static url for localhost.. i also tried that from the website which gave me same thing except didnt show me the errors.. )
https://wordpress.pastebin.com/t5bDHJVRThis is the html
https://wordpress.pastebin.com/c2Xh7avGSo my questions are:
First of all why wont the links to sidebars work without static urls? id rather have dynamic urls.
Secondly.. when it does load it.. why does it throw that error? and how to get rid of it?I cant think of anything except that it is the way that the files are loaded which then creates the error somehow.. (all the files associated with this are in the theme root. “javascript.js” “sidebar1.php – sidebar3.php” and the file that has the html part of this )
- The topic ‘Sidebartabs embedding weirdness.’ is closed to new replies.