Support » Fixing WordPress » Custom Field if Img is empty display nothing.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Try it with something like this: http://pastebin.com/7zwbhNzj

    Thread Starter nbatioco

    (@nbatioco)

    Hi thank you so much for your help and I really appreciate it a lot however It did not work for some reason and I cant see the rest of the codes while loading the page like the sidebar and the footer.

    Here’s is my original code: http://pastebin.com/8Q000zzg

    I have change my entire script to the script you have just reply to my post.

    Moderator keesiemeijer

    (@keesiemeijer)

    There was an error in the code. Try it with this: http://pastebin.com/NbhYKTqf

    Thread Starter nbatioco

    (@nbatioco)

    Hi keesiemeijer, thank so you much for everything… Your code is working perfectly the way I want it but I have one problem, I love to link the image to the image itself because I have a plug-in that when you click an image it will open in a slideshow.

    I have try inserting this one: `<?php if($oneimg != ”) : ?>
    <!– code for oneimg here –>
    <a href=”<?php echo get_post_meta($post->ID, ‘Oneimg’, true); ?>” rel=”lightbox[<?php echo get_post_meta($post->ID, ‘lightbox’, true)]”>
    <img src=”<?php echo get_post_meta($post->ID, ‘Oneimg’, true); ?>” class=”trailer-gallery-img” title=”<?php the_title(); ?>” alt=”<?php the_title(); ?>” /></a>
    <?php endif; ?>`

    Thread Starter nbatioco

    (@nbatioco)

    Thank you so much keesiemeijer, II found our that my code is wrong and I noticed it and it work perfectly now. I only have one problem on the css of my lightbox plug-in.

    If you have time you can visit this link:
    http://enimz.com/fast-five-fast-and-the-furious/

    I am trying to input all my knowledge down there!

    Thanks once again and I appreciate all of your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Field if Img is empty display nothing.’ is closed to new replies.