Support Forum
Hello,
I'm having trouble with CodeCanyon's Extensio theme.
Simplepress looks gorgeous on my site, http://www.sitrep.at , and we have the forum at sitrep.at/forum. Everything looks great, works well, but of course, the Add Topic button doesn't work. Following the FAQs, it looks like the theme is calling google for jquery, resulting in the script error. I've contacted the author of this popular looking theme, but have not been able to get a response. Would you mind taking a look at the functions.php code and letting me know if there's something I can do to fix the issue?
Following your advice to others, I enclose the original functions.php with the jquery calling to Google, and the sourcecode of the homepage. If there's anything else I can do, please let me know.
Many thanks in advance,
Michael
---
Look in the functions file and fnd the function:
function my_init_scripts() and right at thw top there are these three lines:
wp_deregister_script('jquery'); wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', false, '1.7.1'); wp_enqueue_script('jquery');
Just comment out the top two leaving the wp_enqueue_script() line to be processed.
The theme is loading a 'tabs' library and 'accordion' library it has supplied. These should really be loaded from the libraries supplied by WP especially as they will get out of date with the main jQuery version. But he is also loading a 'tabs2' script and I have no idea what that is and how it might interact. So I would try the one change first to see what happens and see if anything else gets broken by it.
YELLOW
SWORDFISH
|
Hello Yellow Swordfish, and thank you for the suggestion!
Commenting out the first two lines fixed the Add Topic issue in SimplePress, while leaving tab & tabs2 (for a side bar menu) working. However, consistently, it breaks the Nivo-slider that's on the homepage. I've updated the nivo-slider with the latest version, but still no go. I also edited the second line above to call from wp-content, which did fix the Add Topic, but broke the slider again.
Sorry to trouble you again, but would you have any idea for calling jquery just for the forum page, but not elsewhere?
Thank you very much in advance!!
you can do a check...
if (sp_is_forumpage()) { # forum page stuff here } else { # non forum page }
Visit Cruise Talk Central and Mr Papa's World
Thank you both for your help. I added the conditional per above, the main site works, slider works (actually onebyone), but still can't get Add Topic to work. Would you mind checking my edits to this section? Very much appreciated your quick reply. Many thanks again!!
My forum page is just http://www.sitrep.at/forum/. The text below works for everything else except the Add Topic.
-----
function my_init_scripts() {
if (sp_is_forumpage()) {
wp_enqueue_script('jquery'); } else {
if (!is_admin()) {
global $shortname;
wp_deregister_script('jquery');
wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', false, '1.7.1');
wp_enqueue_script('jquery');
if (is_home() || is_front_page())
if (get_option($shortname.'_slider_type') == 'Piecemaker Slider') {
wp_enqueue_script('jquery_swfobject', get_template_directory_uri().'/js/piecemaker/swfobject.js', false, '2.1', false);
}
if ( (is_page_template('portfolio-two-sortable.php')) || (is_page_template('portfolio-three-sortable.php')) || (is_page_template('portfolio-four-sortable.php')) ) {
wp_enqueue_script('jquery_isotope', get_template_directory_uri().'/js/isotope/jquery.isotope.min.js', false, '1.5.04', false);
}
wp_enqueue_script('jquery_tabs', get_template_directory_uri().'/js/tabs.js', false, '1.0', false);
wp_enqueue_script('jquery_tabs2', get_template_directory_uri().'/js/tabs2.js', false, '1.0', false);
wp_enqueue_script('jquery_accordion', get_template_directory_uri().'/js/jquery.accordion.js', false, '1.0', false);
wp_enqueue_script('jquery_caroufredsel', get_template_directory_uri().'/js/jquery.carouFredSel-5.5.0.js', false, '5.5.0', false);
if (is_home() || is_front_page())
if (get_option($shortname.'_slider_type') == 'Accordion Slider') {
wp_enqueue_script('jquery_accordion_slider', get_template_directory_uri().'/js/accordion/accordion.js', false, '5.5.0', false);
}
//if (is_home() || is_front_page())
//if (get_option($shortname.'_slider_type') == 'OneByOne Slider') {
wp_enqueue_script('jquery_onebyone_slider', get_template_directory_uri().'/js/onebyone/jquery.onebyone.js', false, '1.0', false);
wp_enqueue_script('jquery_touchwipe', get_template_directory_uri().'/js/onebyone/jquery.touchwipe.min.js', false, '1.1.0', false);
//}
wp_enqueue_script('jquery_prettyphoto', get_template_directory_uri().'/js/jquery.prettyPhoto.js', false, '3.1.3', false);
wp_enqueue_script('jquery_main', get_template_directory_uri().'/js/main.js', false, '1.1.0', false);
wp_enqueue_script('jquery_validationengine_lang', get_template_directory_uri().'/js/contact/languages/jquery.validationEngine-en.js', false, '1.0', false);
wp_enqueue_script('jquery_validationengine', get_template_directory_uri().'/js/contact/jquery.validationEngine.js', false, '2.5.1', false);
} }
}
Thank you for replying.
Keeping with the above code edit:
On the forum page, nothing is being called from google (except fonts), only locally, but Add Topic is still not working.
On the other pages, all the sliders and tabs are working just fine.
I then tried a jquery plugin to update the wp jquery to the latest version thru WP jQuery Plus.
I'm so stuck! Thank you for keeping on top of this.
1 Guest(s)