Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7162139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:41:08+00:00 2026-05-28T13:41:08+00:00

I have a slideshow set up with Magic fields like the code below, but

  • 0

I have a slideshow set up with Magic fields like the code below, but
now I need each image to have a seperate link. How can I set this up?
I just can’t think how I can add this to the code below, I appreciate
any help anyone can offer me.

<div id="slider"> 
<?php 
    $images = getFieldOrder('slideshow_slide'); 
    if(is_array($images)){ 
        foreach($images as $image){ 
            echo get_image('slideshow_slide',1,$image); 
        } 
    } 
?> 
</div> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:41:08+00:00Added an answer on May 28, 2026 at 1:41 pm

    Hooray MagicFields! <3

    There are two ways to get an image in MagicFields.

    Method 1 will return a full image tag:

    echo get_image('slideshow_slide');
    

    Method 2 just returns the url of the image:

    echo get_image('slideshow_slide',1,1,0);
    

    In order to generate a link to your full-size image, you’ll need to construct an anchor tag using the second method. Maybe something like this:

    $image_path = get_image('slideshow_slide',1,1,0);
    

    echo '<a href="' . $image_path . '">Insert link text or thumbnail here</a>';

    You might need to modify the above to work with your foreach loop, but that’s the basic idea.

    Update:
    Here’s what you need to do. Create another duplicateable text field, called image_url. This field will hold the link for your image. Each image will need a corresponding url. This loop should do what you want:

    if(is_array($images)){
    foreach($images as $image){
    $image_url = get('image_url',1,$image);
    echo "<a href='" . $image_url ."'>" . get_image('slideshow_slide',1,$image) . "</a>";
    }
    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented the following set up (after being requested): slideshow of images changing,
I have an audio track with an image slideshow - e.g. there's image 1
I have this code to run a slideshow (this is only part of what
I have a picture slideshow that works on a click of a button like
I have a slideshow item. who's image is enlargeable. when i click on image
I have an image upload for a slideshow, and the users are continuously uploading
I am creating a slideshow shortcode for my Wordpress theme, but have run into
I'm building a site in PHP and have javascript code for a 'fadeshow' (slideshow
I have a slideshow built in flash that I want to mimic in jQuery.
ok, so i have this slideshow.html containing just a bunch of pictures, and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.