WordPress mystery - slider works in page, but not home page

3,045 views
Skip to first unread message

Emonzaemon Souda

unread,
Apr 20, 2012, 3:37:05 PM4/20/12
to Camera for Wordpress
Greetings all,

This slider is great! It does everything I could ever wish a slider
could do. However, I am having difficulty having it appear on my home
page.

I am using the Ovid theme. Like other themes, you can designate a page
to be the home page. So a page called "Home" (seen here:
http://wp.irthsolutions.com/home/ ) proudly displays the slider using
the shortcode [camera slideshow="my-first-slideshow"]

But when you go to the index page (which is getting its content from
Home), the slider is gone: http://wp.irthsolutions.com/

Ovid theme: http://themes.themegoods.com/ovid_wp/

I'm baffled on why this is happening. Any ideas?

Manuel Masia

unread,
Apr 21, 2012, 3:48:46 AM4/21/12
to camera-for...@googlegroups.com
Hi Emonzaemon Souda,

Camera works only if you use it on the loop, that means on a page, a post, a custom post (with the shortcode or the meta box), otherwise it doesn't load the scripts it needs.

If you want to use it outside the loop, you must add this code to the head tag of your theme (usually in the file called header.php):

<?php 

global $plugindir;
wp_enqueue_style('camera-css-front', $plugindir.'css/camera_front.css', false, '1.0', 'all');
wp_enqueue_style('camera-css-colorbox', $plugindir.'css/colorBox'.camera_get_option('camera_colorbox_skin').'/colorbox.css', false, '1.0', 'all');

wp_enqueue_script('jquery-pix'); 
wp_enqueue_script('swfobject'); 
wp_enqueue_script('jquery-hoverIntent'); 
wp_enqueue_script('jquery-easing'); 
if(camera_get_option('camera_colorbox')=='true') { 
wp_enqueue_script('camera-colorbox'); 



if(camera_detectMobile() && 
camera_get_option('camera_jquerymobile')=='true') { 
wp_enqueue_script('camera-jquery-mobile'); 


wp_enqueue_script('camera-slide'); 
wp_enqueue_script('camera-init'); 
?> 

Emonzaemon Souda

unread,
Apr 22, 2012, 4:28:21 PM4/22/12
to Camera for Wordpress
A thousand thanks to you, Manuel Masia.

It works perfectly! And such, and elegant and easy solution too!

I'm emailing my boss now to insist to buy up those great pixedelic
themes on themeforest and to send a hearty donation. You deserve a
large quantity of beer and ice cream for providing this supreme slider
and super-quick support.

Thanks again!
> *http://www.pixedelic.com*http://www.consorziocreativo.comhttp://themeforest.net/user/pixedelichttps://twitter.com/#!/pixedelichttp://dribbble.com/pixedelichttp://www.facebook.com/pages/Consorzio-Creativo/209711855772

Manuel Masia

unread,
Apr 25, 2012, 5:19:39 AM4/25/12
to camera-for...@googlegroups.com
Thank you too! 

Manuel :-)



2012/4/22 Emonzaemon Souda <pk2o...@gmail.com>



--
Manuel Masia – Pixedelic

NinjaTuna

unread,
May 1, 2012, 8:41:41 AM5/1/12
to Camera for Wordpress
Thanks for your quick response on the wordpress forums :)
I added the code you gave in the seconds post of this discussion
between the <head></head> tags and something seems to run, but still
no slideshow :(
Firebug throws the following error:

t.camera is not a function
http://localhost:81/wordpress/wp-content/plugins/camera-slideshow/scripts/camera.init.js?ver=3.3.2
Line 45

On 25 apr, 11:19, Manuel Masia <m...@pixedelic.com> wrote:
> Thank you too!
>
> Manuel :-)
>
> 2012/4/22 Emonzaemon Souda <pk2oz...@gmail.com>
> > themeforest.net/user/pixedelichttps://twitter.com/#!/pixedelichttp://dribbble.com/pixedelichttp://w...

Manuel Masia

unread,
May 3, 2012, 4:48:16 AM5/3/12
to camera-for...@googlegroups.com
If t.camera is not a function, it means that you didn't call the main file (camera.js or camera.min.js). Please, check

Manuel :-)



2012/5/1 NinjaTuna <ninj...@live.nl>



--
Manuel Masia – Pixedelic

NinjaTuna

unread,
May 3, 2012, 8:07:52 AM5/3/12
to Camera for Wordpress
I'm not entirely sure how to do that :(
I tried by adding the <script src="blah"></script>, but Im sure that
isnt the correct way since it still does not work...
Could it maybe be the fact I use WordPress 3.3.2?

On 3 mei, 10:48, Manuel Masia <m...@pixedelic.com> wrote:
> If t.camera is not a function, it means that you didn't call the main file
> (camera.js or camera.min.js). Please, check
>
> Manuel :-)
>
> 2012/5/1 NinjaTuna <ninjat...@live.nl>
>
>
>
>
>
>
>
>
>
> > Thanks for your quick response on the wordpress forums :)
> > I added the code you gave in the seconds post of this discussion
> > between the <head></head> tags and something seems to run, but still
> > no slideshow :(
> > Firebug throws the following error:
>
> > t.camera is not a function
>
> >http://localhost:81/wordpress/wp-content/plugins/camera-slideshow/scr...

Manuel Masia

unread,
May 3, 2012, 8:52:31 AM5/3/12
to camera-for...@googlegroups.com
The right way is put in the head tag this code:

<?php 
wp_enqueue_script('jquery-pix'); 
wp_enqueue_script('swfobject'); 
wp_enqueue_script('jquery-hoverIntent'); 
wp_enqueue_script('jquery-easing'); 
if(camera_get_option('camera_colorbox')=='true') { 
wp_enqueue_script('camera-colorbox'); 

if(camera_detectMobile() && 
camera_get_option('camera_jquerymobile')=='true') { 
wp_enqueue_script('camera-jquery-mobile'); 

wp_enqueue_script('camera-slide'); 
wp_enqueue_script('camera-init'); 
?> 

Then you must put the slideshow in the place where you want to display it by using this code: <?php do_shortcode echo ('[camera slideshow ="the-sanitized-name-of-the-slideshow"]'); ?>

Manuel :-)




2012/5/3 NinjaTuna <ninj...@live.nl>



--
Manuel Masia – Pixedelic

NinjaTuna

unread,
May 3, 2012, 9:19:46 AM5/3/12
to Camera for Wordpress
I did, here is the code block:
http://ninjatuna.tk/Jing/2012-05-03_1517.png
Then I put the shortcode in the correct div:
http://ninjatuna.tk/Jing/2012-05-03_1519.png
But it doesnt work, same error as before...

On 3 mei, 14:52, Manuel Masia <m...@pixedelic.com> wrote:
> The right way is put in the head tag this code:
>
> <?php
> wp_enqueue_script('jquery-pix');
> wp_enqueue_script('swfobject');
> wp_enqueue_script('jquery-hoverIntent');
> wp_enqueue_script('jquery-easing');
> if(camera_get_option('camera_colorbox')=='true') {
> wp_enqueue_script('camera-colorbox');
>
> }
>
> if(camera_detectMobile() &&
> camera_get_option('camera_jquerymobile')=='true') {
> wp_enqueue_script('camera-jquery-mobile');
>
> }
>
> wp_enqueue_script('camera-slide');
> wp_enqueue_script('camera-init');
> ?>
>
> Then you must put the slideshow in the place where you want to display it
> by using this code: <?php do_shortcode echo ('[camera slideshow
> ="the-sanitized-name-of-the-slideshow"]'); ?>
>
> Manuel :-)
>
> 2012/5/3 NinjaTuna <ninjat...@live.nl>

Manuel Masia

unread,
May 3, 2012, 9:29:07 AM5/3/12
to camera-for...@googlegroups.com
Are you working on local? Is it possible to see the project "in action"?

Manuel :-)


--
Manuel Masia – Pixedelic
via Brescia, 15
47841 - Cattolica (RN)
p. iva 03718310406
 

NinjaTuna

unread,
May 3, 2012, 9:42:49 AM5/3/12
to Camera for Wordpress
I'm currently working local with "Wamp Server". I have, however put
everything online, so you can check it out (database migration did not
work out just fine but the lay-out (work in progress :P) is as it
should be).
Here it is: http://maurik.ninjatuna.tk/
I now get a php error as well...

On 3 mei, 15:29, Manuel Masia <m...@pixedelic.com> wrote:
> Are you working on local? Is it possible to see the project "in action"?
>
> Manuel :-)
>
> --
> Manuel Masia – Pixedelic
> via Brescia, 15
> 47841 - Cattolica (RN)
> p. iva 03718310406
>

Manuel Masia

unread,
May 3, 2012, 9:46:37 AM5/3/12
to camera-for...@googlegroups.com
Hi,

I'm afraid the problem is the second time you call jQuery: jQuery is called twice on your site, one time in the header and one time in the footer. I think you must avoid to call it again on the footer or try to load all the scripts that camera needs in the footer.

Let me know

Manuel :-)



2012/5/3 NinjaTuna <ninj...@live.nl>
I'm currently working local with "Wamp Server". I have, however put



--
Manuel Masia – Pixedelic

NinjaTuna

unread,
May 3, 2012, 10:08:17 AM5/3/12
to Camera for Wordpress
Thanks a bunch! Checking the "Move scripts to footer" thingie fixed
the errors, should have noticed that one myself, sorry.
Weird thing is the slideshow now works perfectly online, but locally
things get pretty messed up :S, although they should be exactly the
same...
http://ninjatuna.tk/Jing/2012-05-03_1607.png
Have you encountered such a thing before? I'll have a look at it
myself too.

On 3 mei, 15:46, Manuel Masia <m...@pixedelic.com> wrote:
> Hi,
>
> I'm afraid the problem is the second time you call jQuery: jQuery is called
> twice on your site, one time in the header and one time in the footer. I
> think you must avoid to call it again on the footer or try to load all the
> scripts that camera needs in the footer.
>
> Let me know
>
> Manuel :-)
>
> 2012/5/3 NinjaTuna <ninjat...@live.nl>
>
>
>
>
>
>
>
>
>
> > I'm currently working local with "Wamp Server". I have, however put
> > everything online, so you can check it out (database migration did not
> > work out just fine but the lay-out (work in progress :P) is as it
> > should be).
> > Here it is:http://maurik.ninjatuna.tk/
> > I now get a php error as well...
>
> > On 3 mei, 15:29, Manuel Masia <m...@pixedelic.com> wrote:
> > > Are you working on local? Is it possible to see the project "in action"?
>
> > > Manuel :-)
>
> > > --
> > > Manuel Masia – Pixedelic
> > > via Brescia, 15
> > > 47841 - Cattolica (RN)
> > > p. iva 03718310406
>

NinjaTuna

unread,
May 3, 2012, 10:12:08 AM5/3/12
to Camera for Wordpress
There seems to be some CSS missing, I'll check it out and let you know
when I get it to work!

On 3 mei, 16:08, NinjaTuna <ninjat...@live.nl> wrote:
> Thanks a bunch! Checking the "Move scripts to footer" thingie fixed
> the errors, should have noticed that one myself, sorry.
> Weird thing is the slideshow now works perfectly online, but locally
> things get pretty messed up :S, although they should be exactly the
> same...http://ninjatuna.tk/Jing/2012-05-03_1607.png
> > *http://www.pixedelic.com*http://www.consorziocreativo.comhttp://theme...

NinjaTuna

unread,
May 3, 2012, 10:29:22 AM5/3/12
to Camera for Wordpress
Indeed the css files were not included, now it works :D Again, thank
you a lot for your time!

NinjaTuna

unread,
May 3, 2012, 11:05:41 AM5/3/12
to Camera for Wordpress
Hey, it's me again, sorry for the quadruple post, but I can't find an
edit button around here.
This time I've got a suggestion:
I've noticed the little radio button-like things to switch image are
aligned vertically in IE7
http://ninjatuna.tk/Jing/2012-05-03_1703.png
This can be fixed by putting "float: right;" in the "camera_front.css"
under ".camera_wrap .camera_pag .camera_pag_ul li" (line 217 with me)
It does not seem to conflict anywhere so maybe you want to check it
out ;)

Manuel Masia

unread,
May 8, 2012, 4:22:31 AM5/8/12
to camera-for...@googlegroups.com
Thank you NinjaTuna,

I'll change the CSS on the next version of Camera

Manuel :-)



2012/5/3 NinjaTuna <ninj...@live.nl>
Hey, it's me again, sorry for the quadruple post, but I can't find an



--
Manuel Masia – Pixedelic

Avik Nandy

unread,
Oct 5, 2012, 7:56:01 PM10/5/12
to camera-for...@googlegroups.com, ma...@pixedelic.com
NinjaTuna & Manuel,

Thank you both for this thread - it helped solved the final problem I had w/ making the slider work on my homepage, and now it works beautifully. This is by far one of the most elegant responsive sliders I have ever seen released for Wordpress. Thank you for this, so much. Is there a way to donate money on behalf of your efforts?

Cheers,

.avik!
Message has been deleted

nicnic

unread,
Nov 6, 2012, 1:54:37 AM11/6/12
to camera-for...@googlegroups.com, ma...@pixedelic.com
Hi,

I have followed what has been suggested above but I get the following error:

Parse error: syntax error, unexpected T_ECHO in /home/slice/public_html/wp-content/themes/yoko/index.php on line 8

Any suggestions?

Thanks :)

Avik Nandy

unread,
Nov 6, 2012, 10:18:11 AM11/6/12
to camera-for...@googlegroups.com
Have you just looked at index.php on line 8 to see what code is written there? 

Also this could help you along w/ figuring out your problem - http://www.webdeveloper.com/forum/showthread.php?66537.html - it seems like a potential error in the code on that page, and not necessarily related to Camera fixes/settings...

I ended up putting all the custom CSS styling into the Camera options section on the first tab of the plugin, instead of anywhere else, and that resolved all my problems.

Also : the error you've indicated doesn't directly mean that it's changes related to Camera that's causing it. You could just be missing a closing bracket or something.

.a

nicnic

unread,
Nov 8, 2012, 10:39:39 PM11/8/12
to camera-for...@googlegroups.com
Line 8 is:

<?php do_shortcode echo ('[camera slideshow ="my-first-slideshow"]'); ?>

When I take that line out I don't get that error.

Avik Nandy

unread,
Nov 9, 2012, 10:19:34 AM11/9/12
to camera-for...@googlegroups.com
You've got it the wrong way around, I believe... http://codex.wordpress.org/Function_Reference/do_shortcode

It should be:

<?php echo do_shortcode('[camera slideshow ="my-first-slideshow"]'); ?>

instead.

nicnic

unread,
Nov 16, 2012, 11:15:23 PM11/16/12
to camera-for...@googlegroups.com
Thanks for that. It works now, but it shows in a weird way, here's the link: http://rethinkers.com.au/home/

Avik Nandy

unread,
Nov 17, 2012, 3:08:29 PM11/17/12
to camera-for...@googlegroups.com
It is because of missing CSS files that you need referenced in order for the plugin to work...This was a part I struggled w/ too for a bit but then I added this to header.php in my child theme...

<?php 
// Camera Slider Initialization

global $plugindir;
wp_enqueue_style('camera-css-front', $plugindir.'/wp-content/plugins/camera-slideshow/css/camera_front.css', false, '1.0', 'all');
wp_enqueue_style('camera-css-colorbox', $plugindir.'/wp-content/plugins/camera-slideshow/css/colorBox'.camera_get_option('camera_colorbox_skin').'/colorbox.css', false, '1.0', 'all');

wp_enqueue_script('jquery-pix'); 
wp_enqueue_script('swfobject'); 
wp_enqueue_script('jquery-hoverIntent'); 
wp_enqueue_script('jquery-easing'); 
if(camera_get_option('camera_colorbox')=='true') { 
wp_enqueue_script('camera-colorbox'); 

if(camera_detectMobile() && 
camera_get_option('camera_jquerymobile')=='true') { 
wp_enqueue_script('camera-jquery-mobile'); 

wp_enqueue_script('camera-slide'); 
wp_enqueue_script('camera-init');  
?>


After you save header.php, clear your cache and you should see your slider behaving. =) Best of luck!

.a

Charly Birondo

unread,
Dec 2, 2012, 12:02:52 AM12/2/12
to camera-for...@googlegroups.com
can anybody help me with this.. i already put the codes in header and also the shortcode.. but nothing happens heres the site http://nistaworld.com/
it should be display after the ticker.. and before the slideshow below.. please help

Charly Birondo

unread,
Dec 2, 2012, 1:16:36 AM12/2/12
to camera-for...@googlegroups.com
here's the error Warning: Invalid argument supplied for foreach() in /home/nistawor/public_html/wp-content/plugins/camera-slideshow/lib/camera_functions.php on line 475

nicnic

unread,
Dec 2, 2012, 6:31:05 PM12/2/12
to camera-for...@googlegroups.com
Hey Avik,

Thanks for that but I had already done this. Any other thoughts?

Murilo Machado

unread,
Feb 26, 2013, 10:46:08 PM2/26/13
to camera-for...@googlegroups.com, ma...@pixedelic.com
Thanks for this answer. After much struggle this post helped me load the plugin into my custom theme.!


Em sábado, 21 de abril de 2012 04h48min46s UTC-3, Manuel Masia escreveu:
Hi Emonzaemon Souda,

Camera works only if you use it on the loop, that means on a page, a post, a custom post (with the shortcode or the meta box), otherwise it doesn't load the scripts it needs.

If you want to use it outside the loop, you must add this code to the head tag of your theme (usually in the file called header.php):

<?php 

global $plugindir;
wp_enqueue_style('camera-css-front', $plugindir.'css/camera_front.css', false, '1.0', 'all');
wp_enqueue_style('camera-css-colorbox', $plugindir.'css/colorBox'.camera_get_option('camera_colorbox_skin').'/colorbox.css', false, '1.0', 'all');

wp_enqueue_script('jquery-pix'); 
wp_enqueue_script('swfobject'); 
wp_enqueue_script('jquery-hoverIntent'); 
wp_enqueue_script('jquery-easing'); 
if(camera_get_option('camera_colorbox')=='true') { 
wp_enqueue_script('camera-colorbox'); 



if(camera_detectMobile() && 
camera_get_option('camera_jquerymobile')=='true') { 
wp_enqueue_script('camera-jquery-mobile'); 


wp_enqueue_script('camera-slide'); 
wp_enqueue_script('camera-init'); 
?> 

Manuel :-)

--
Manuel Masia – Pixedelic
via Brescia, 15
47841 - Cattolica (RN)
p. iva 03718310406
 

Jackye Ferreira

unread,
Sep 7, 2013, 6:38:19 PM9/7/13
to camera-for...@googlegroups.com
Manuel: I think you speak Spanish, looking for some extrahelp.  jf...@bellsouth.net

On Friday, April 20, 2012 3:37:05 PM UTC-4, Emonzaemon Souda wrote:
Greetings all,

This slider is great! It does everything I could ever wish a slider
could do. However, I am having difficulty having it appear on my home
page.

I am using the Ovid theme. Like other themes, you can designate a page
to be the home page. So a page called "Home" (seen here:
http://wp.irthsolutions.com/home/ ) proudly displays the slider using
the shortcode [camera slideshow="my-first-slideshow"]

But when you go to the index page (which is getting its content from
Home), the slider is gone: http://wp.irthsolutions.com/

Ovid theme: http://themes.themegoods.com/ovid_wp/

I'm baffled on why this is happening. Any ideas?

Mr. Koo

unread,
Jan 24, 2014, 11:32:43 AM1/24/14
to camera-for...@googlegroups.com

Hello everybody !


When i try to use the slideshow, i put it in a post and when i look my website i get this message :

Warning: Invalid argument supplied for foreach() in /home/u656285792/public_html/wp-content/plugins/camera-slideshow/lib/camera_functions.php on line 475

Someone know what to do ???

http://wordpress.org/plugins/camera-slideshow/ 

Mr. Koo

unread,
Jan 24, 2014, 11:33:11 AM1/24/14
to camera-for...@googlegroups.com, ma...@pixedelic.com

When i try to use the slideshow, i put it in a post and when i look my website i get this message :

Warning: Invalid argument supplied for foreach() in /home/u656285792/public_html/wp-content/plugins/camera-slideshow/lib/camera_functions.php on line 475

Someone know what to do please ???

http://wordpress.org/plugins/camera-slideshow/

Reply all
Reply to author
Forward
0 new messages