• [“URGENT!!! ” removed from topic]

    Ok so I’ve been working on my Car Demon site and first thing the photos don’t enlarge at all and theres no thumbnails and cant seem to be able to add multiple image. Just the featured images. I have modified the template a bit so may be missing some of the php for this please help to let me know what I’m missing so can resolve this ASAP.

    Thanks

    https://www.ads-software.com/plugins/car-demon/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author theverylastperson

    (@theverylastperson)

    Can you provide a link to your site so we can see what is happening? Thanks!

    Thread Starter mbond5

    (@mbond5)

    Hi Jay,

    Here is the link…

    https://modocom.ca/auto-one/cars-for-sale/2002-ford-cougar

    Got the thumbnails too show up but cant seem to add more pictures for a car and it doesnt open in the lightbox

    Thanks,

    Mike

    Plugin Author theverylastperson

    (@theverylastperson)

    The lightbox should be an easy fix, I can see it loading all the javascript for it but the call to launch it isn’t attached to the main photo on your custom single car page (which looks pretty nice btw).

    Just add the following line to the main photo <img> tag;

    onclick="open_car_demon_lightbox('_pic');"

    Adding multiple images was a little more comprehensive before WordPress 3.5 was released. It added some great improvements to adding images and other media directly into posts, but it makes it a little harder to understand for Car Demon.

    All you need to do is click on the add media button and then upload the images while you’re on the vehicle edit page and it should attach them to the vehicle without needing to insert them. Can you give that a try and see if it works for you?

    Thread Starter mbond5

    (@mbond5)

    Hello Jay,

    Which PHP file and what line do I add the

    onclick=”open_car_demon_lightbox(‘_pic’);

    Also, when I try to add photos from media library by clicking Add Media and uploading images for some odd reason it adds to the Photo Ribbon when I’m not even in that module I’m trying to add to the main text field. I do lots of WordPress sites and have not run into this issue in past with other sites.

    Thanks,

    Mike

    Thread Starter mbond5

    (@mbond5)

    I think I found out where to put that piece of code you provided but it did not work.

    Thanks,

    Mike

    Plugin Author theverylastperson

    (@theverylastperson)

    Hey Mike,

    I took a quick look and I can see the issue. The code didn’t get copied correctly. This is what I see when viewing the source for your page;

    onclick="open_car_demon_lightbox(" _pic");"=""

    You need to make sure to use single quotes inside the javascript function call. Also, the =”” at the very end needs to be remove.

    onclick="open_car_demon_lightbox('_pic');"

    You also need to make sure there’s no space before _pic

    You do have it in the right place though. So the final page should look like this when you view the source (after page has loaded).

    <img onerror="ImgError(this, 'no_photo.gif');" onclick="open_car_demon_lightbox('_pic');" id="_pic" name="_pic" class="car_demon_main_photo" width="350px" src="https://modocom.ca/auto-one/wp-content/uploads/2013/07/ford.jpg">
    Thread Starter mbond5

    (@mbond5)

    Hey Jay,

    I put it in there exact code and it breaks everything I’m putting the code into the car-demon-template.php file and seems like the double quotes breaks everything. So I took it out. Is that the right file I’m putting it into?

    Thanks,

    Mike

    Thread Starter mbond5

    (@mbond5)

    I mean the single quotes around _pic breaks it lol sorry typo.

    Plugin Author theverylastperson

    (@theverylastperson)

    Oh, I see what you’re doing. I thought you created a custom style or modified your theme. You’re editing Car Demon itself.

    That makes sense, but the issue you’re going to run into is not being able to update Car Demon and you’re going to want to do that long term.

    This doesn’t mean what you’re doing won’t work, but long term I think you’ll be happier if you went with a slightly different method.

    For right now let’s work on getting your site working by continuing the direction you’ve been going in. You can go back and use a different method later.

    Since this is going directly into the php you’ll need to ‘escape’ the quotes using a \ symbol directly before the quote;

    onclick="open_car_demon_lightbox(\'_pic\');"

    if that doesn’t work try this;

    onclick='open_car_demon_lightbox(\"_pic\");'

    Plugin Author theverylastperson

    (@theverylastperson)

    On a side note, what’s the name of the theme you’re using?

    Thread Starter mbond5

    (@mbond5)

    Excellent,

    That works, got the lightbox popping up now.

    I can style it afterwards how I want it, now just the adding new pictures issue.

    Yea I know I went a weird way around this, hopefully in future can get it fixed up so updates won’t effect the theme lol.

    So any ideas on why I can add multiple pictures.

    Thanks,

    Mike

    Thread Starter mbond5

    (@mbond5)

    Its just a theme I created, didn’t purchase it designed it then started coding.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Photos Dont Work Cant Enlarge And No Thumbs’ is closed to new replies.