I use wordpress in a lan with wamp. I can correctly see the lan from client pcs. It works perfectly with non wordpress websites so i don't think it's a lan setting problem. Is there any particular setting i should set in wordpress? Actually, it loads correctly, but without JS and CSS.
UPDATE, here's how CSS and JS are loaded in the plugin:
function agenda_my_scripts() {
if ( !is_admin() ) {
// datepicker
wp_enqueue_script( 'custom-datepicker', plugins_url( 'sys/js/datepicker.js', dirname(__FILE__) ), array('jquery') );
wp_enqueue_script('jquery-ui-datepicker');
// CSS
wp_register_style( 'agenda_css', plugins_url( 'sys/css/style.css', dirname(__FILE__) ) );
wp_enqueue_style( 'agenda_css' );
// jQuery CSS
wp_register_style( 'jquery_ui_css', plugins_url( 'sys/css/jquery-ui.css', dirname(__FILE__) ) );
wp_enqueue_style( 'jquery_ui_css' );
}
} add_action('wp_enqueue_scripts','agenda_my_scripts');
Then the child theme have the classic configuration:
/*
Theme Name: Theme name
Theme URI: -
Description: Description
Author: Author
Author URI: -
Template: child_template
Version: 1.0
Tags: -
Text Domain: child_template
*/
@import url("../twentytwelve/style.css");
where 'template' and 'text domain' match folder's name.
Moreover, if i activate the child theme, it loads twentyfourteen!!
This is very weird...
I use wordpress in a lan with wamp. I can correctly see the lan from client pcs. It works perfectly with non wordpress websites so i don't think it's a lan setting problem. Is there any particular setting i should set in wordpress? Actually, it loads correctly, but without JS and CSS.
UPDATE, here's how CSS and JS are loaded in the plugin:
function agenda_my_scripts() {
if ( !is_admin() ) {
// datepicker
wp_enqueue_script( 'custom-datepicker', plugins_url( 'sys/js/datepicker.js', dirname(__FILE__) ), array('jquery') );
wp_enqueue_script('jquery-ui-datepicker');
// CSS
wp_register_style( 'agenda_css', plugins_url( 'sys/css/style.css', dirname(__FILE__) ) );
wp_enqueue_style( 'agenda_css' );
// jQuery CSS
wp_register_style( 'jquery_ui_css', plugins_url( 'sys/css/jquery-ui.css', dirname(__FILE__) ) );
wp_enqueue_style( 'jquery_ui_css' );
}
} add_action('wp_enqueue_scripts','agenda_my_scripts');
Then the child theme have the classic configuration:
/*
Theme Name: Theme name
Theme URI: -
Description: Description
Author: Author
Author URI: -
Template: child_template
Version: 1.0
Tags: -
Text Domain: child_template
*/
@import url("../twentytwelve/style.css");
where 'template' and 'text domain' match folder's name.
Moreover, if i activate the child theme, it loads twentyfourteen!!
This is very weird...
Share Improve this question edited Mar 22, 2014 at 8:43 Mariano asked Mar 21, 2014 at 7:52 MarianoMariano 1371 gold badge4 silver badges16 bronze badges 5- It's obvious. You don't have the CSS/JS LAN - development kit - plugin for Wordpress;-) No just kidding. A guess would be that it is htacess-related or it's that simple that it points to incorrect css/js - file. – bestprogrammerintheworld Commented Mar 21, 2014 at 10:51
- Locally it loads CSS/JS correctly, only via lan i get the problem... What about your "htacess-related" guess? – Mariano Commented Mar 21, 2014 at 14:57
- Please show use how you load the js/css files in the header (in the WP-installation) and where the the actual js/css files is. – bestprogrammerintheworld Commented Mar 22, 2014 at 7:02
- i've updated the code with the original question... – Mariano Commented Mar 22, 2014 at 8:44
- ok i solved it, or better: i solved the css/js issue but the child theme is still looking for twentyfourteen instead of twentytwelve...i'll post the solution to the main problem below – Mariano Commented Mar 22, 2014 at 9:40
2 Answers
Reset to default 3finally i solved it...this was a very annoying problem! just enter your db and change in wp_option: - siteurl: from localhost server's lan ip - home: from localhost server's lan ip
that's it! :)
Just run this query in your sql console:
update wp_options
set option_value = '/'
WHERE option_name = 'home'
OR option_name = 'siteurl'