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

  • Home
  • SEARCH
  • 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 8315605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:10:12+00:00 2026-06-08T21:10:12+00:00

I am not using the nivo slider wordpress plugin, instead I am using regular

  • 0

I am not using the nivo slider wordpress plugin, instead I am using regular nivo slider jquery and implemented it to work in wordpress, and currently my “read more” button is as follows:

<a href='".get_permalink()."'>Read More</a>

What I want to implement is something like a get_permalinkpage? So basically I want to be able to make the read more link to a wordpress page of my choosing instead of the post’s permalink. But I do not know how to implement a custom option to the posts page that would allow the user to say “Choose from pages to link the nivo slider slide to: (then shows pages on website)” and then output that selection.

Any help? This is the last thing I need to implement for our website!

  • 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-06-08T21:10:13+00:00Added an answer on June 8, 2026 at 9:10 pm

    Right, I have your answer here as it’s something I did myself recently. This is really a question about custom metaboxes. Here’s some resources on it – I got sent a link on it from a mate who recommends this;

    http://www.deluxeblogtips.com/meta-box/

    And in the Bones theme the author recommends this one;

    https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress

    I will post some code here if you want to quickly get going with it. I would place the following code in a file in it’s own and include it from your functions.php, ie;

     require_once('includes/metabox-post.php');
    

    Create an includes directory in your theme directory and create a file containing this code;

    <?php
    
    /* CUSTOM METABOX  -----------------------------------------------------*/
    
    //We create an array called $meta_box and set the array key to the relevant post type
    $meta_box_post['post'] = array( 
    
    //This is the id applied to the meta box
    'id' => 'post-format-meta',   
    
    //This is the title that appears on the meta box container
    'title' => 'My Custom Metabox',    
    
    //This defines the part of the page where the edit screen section should be shown
    'context' => 'normal',    
    
    //This sets the priority within the context where the boxes should show
    'priority' => 'high', 
    
    //Here we define all the fields we want in the meta box
    'fields' => array(  
        array(
            'name' => 'Home Slider Link',
            'desc' => 'You can create a custom link for the home slider image (ie to link to the shop).  If left blank, it will by default link through to this post.',
            'id' => 'home-slide-link',
            'type' => 'text',
            'default' => ''
        )
    
       )
    
    );
    
    add_action('admin_menu', 'meta_add_box_post');
    
    
     //Add meta boxes to post types
    function meta_add_box_post() {
    global $meta_box_post;
    
    foreach($meta_box_post as $post_type => $value) {
        add_meta_box($value['id'], $value['title'], 'meta_format_box_post', $post_type, $value['context'], $value['priority']);
      }
    }
    
    //Format meta boxes
    function meta_format_box_post() {
      global $meta_box_post, $post;
    
      // Use nonce for verification
      echo '<input type="hidden" name="plib_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
    
      echo '<table class="form-table">';
    
      foreach ($meta_box_post[$post->post_type]['fields'] as $field) {
          // get current post meta data
          $meta = get_post_meta($post->ID, $field['id'], true);
    
          echo '<tr>'.
                  '<th style="width:20%"><label for="'. $field['id'] .'">'. $field['name']. '</label></th>'.
                  '<td>';
      switch ($field['type']) {
          case 'text':
              echo '<input type="text" name="'. $field['id']. '" id="'. $field['id'] .'" value="'. ($meta ? $meta : $field['default']) . '" size="30" style="width:97%" />'. '<br />'. $field['desc'];
              break;
          case 'textarea':
              echo '<textarea name="'. $field['id']. '" id="'. $field['id']. '" cols="60" rows="4" style="width:97%">'. ($meta ? $meta : $field['default']) . '</textarea>'. '<br />'. $field['desc'];
              break;
          case 'select':
              echo '<select name="'. $field['id'] . '" id="'. $field['id'] . '">';
              foreach ($field['options'] as $option) {
                  echo '<option '. ( $meta == $option ? ' selected="selected"' : '' ) . '>'. $option . '</option>';
              }
              echo '</select>';
              break;
          case 'radio':
              foreach ($field['options'] as $option) {
                  echo '<input type="radio" name="' . $field['id'] . '" value="' . $option['value'] . '"' . ( $meta == $option['value'] ? ' checked="checked"' : '' ) . ' />' . $option['name'];
              }
              break;
          case 'checkbox':
              echo '<input type="checkbox" name="' . $field['id'] . '" id="' . $field['id'] . '"' . ( $meta ? ' checked="checked"' : '' ) . ' /<br />&nbsp;&nbsp;'. $field['desc'];
              break;
      }
      echo     '<td>'.'</tr>';
      }
    
      echo '</table>';
    
    }
    
    // Save data from meta box
    function meta_save_data_post($post_id) {
        global $meta_box_post,  $post;
    
       //Verify nonce
        if (!wp_verify_nonce($_POST['plib_meta_box_nonce'], basename(__FILE__))) {
            return $post_id;
        }
    
        //Check autosave
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
            return $post_id;
        }
    
        //Check permissions
        if ('page' == $_POST['post_type']) {
           if (!current_user_can('edit_page', $post_id)) {
                return $post_id;
            }
        } elseif (!current_user_can('edit_post', $post_id)) {
           return $post_id;
        }
    
        foreach ($meta_box_post[$post->post_type]['fields'] as $field) {
            $old = get_post_meta($post_id, $field['id'], true);
            $new = $_POST[$field['id']];
    
            if ($new && $new != $old) {
                update_post_meta($post_id, $field['id'], $new);
            } elseif ('' == $new && $old) {
                delete_post_meta($post_id, $field['id'], $old);
            }
        }
    }
    
    add_action('save_post', 'meta_save_data_post');
    
    
    ?>
    

    The this will add a new custom metabox to your posts which you can type in an alternative url into. This custom option will have the id home-slide-link. To use that url you would include the following in your template loop whilst building up the list of Nivoslider images;

     <?php
    if ( get_post_meta($post->ID, 'home-slide-link', true) ) :
        $slideLink = get_post_meta($post->ID, 'home-slide-link', true); 
    else :
        $slideLink = get_permalink();
    endif;
    
       echo '<a href="'. $slideLink .'"><img src="image link in here" /></a>';
     ?>
    

    So if the post has a url set for the slider link then it uses that, if not it defaults to the permalink.

    Hope this helps you a bit!

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

Sidebar

Related Questions

I am using the Nivo-slider Wordpress plugin, and love how it looks and how
We're currently not using any serious client side framework besides jQuery (and jQuery.ui +
I'm currently using nivo-slider here the problem is, I want the displayed pictures in
I am currently using nivo slider and I was wondering if anyone know if
i'm using Nivo Slider in my Wordpress and vBulletin with a Iframe . but
[edit] I am NOT using jquery in this app. Looking for a way to
I am using nivo slider( default theme) and I positioned the prev and next
I'm not using JQuery but I know they have functions to do this. I
To anyone who uses Nivo Slider, is there any straightforward way (or not) to
I am using the following javascript to animate two slideshows using the nivo slider

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.