Hi there,
Could you elaborate on what you mean by not working? Is there any carousel code outputted when you view the html source?
Phil
Hi!
No, absolutely no code or other is outputted.
Ok.. Can you make the spanish category display on the english template page?
Yes I can do that.
The default language is Spanish, so
mydomain.com/
will show the page “Inicio”.
When I click to view the English page I get
mydomain.com/?lang=en
and it shows the page called “Home”.
The php files are:
page-inicio.php
page-home.php
I can view the English carousel in the Spanish page, but neither work on the English page. The code is identical in both
Hmm, this is strange. Sorry to be patronising, but you’re sure that the template files that you’re editing are the ones that are displaying the output? (You can do an echo 'test'; next to the carousel code on the english template and it shows up?). I only ask because I have been caught out by stupid stuff like this before 🙂
I’d be fairly surprised if WPML is messing around with the code being output from the template tags, though I guess that is possible. Can you get the shortcodes to work in a normal page content body instead of using the template?
If none of this works I’ll have a look on a WPML site myself and see if I can replicate the issue.
Phil
No problem, I’ve committed my share of dumb mistakes.
I can do this:
<div id=”mainpagecarousel”>
<?php echo “HOME”; ?>
<?php echo do_shortcode(‘[image-carousel]’); ?>
</div>
and
<div id=”mainpagecarousel”>
<?php echo “INICIO”; ?>
<?php echo do_shortcode(‘[image-carousel]’); ?>
</div>
in page-home.php and page-inicio.php and see the first echo’d text, but only see the carousel in page-inicio.php
The URL that WP is generating for the links are:
localhost/inicio/
localhost/home/?lang=en
When I change my WP Reading setings to use a static page, I can see these pages in:
localhost/
localhost/?lang=en
Ok, another thing to test if you don’t mind.. Can you see what happens if you set WP_DEBUG to true in the config file? I’ve written support in for multiple languages in the latest version of the plugin, but not tested it much yet. It could be that there is a bug in there somewhere which is only happening when WPML is doing something funny with the translation functions. The plugin may throw some PHP errors or warnings which we might see with WP_DEBUG which could point us in the right direction..
Can you get the shortcodes to work from within a post or page? (not using the do_shortcode() function, just in some content)
Cheers,
Phil
I’m getting the follow notices in both pages:
Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead. in /Users/rob/wordpress/wp-includes/functions.php on line 2908
Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead. in /Users/rob/wordpress/wp-includes/functions.php on line 2908
If I add [image-carousel’] to a post I get the same behavior. Works in the Spanish post, but not in the English post.