• Resolved tapkid113

    (@tapkid113)


    Hello,

    I’m in the middle of editing the WP Nivo Slider plugin (the free one) to customize the title. I am having the following problem, though:
    I want to link the title that is inside of $thumb_attr array, but I can’t seem to figure it out. :/ I don’t know much about PHP, so I am fumbling my way through this.

    The code for the plugin is as follows:

    <div id="slider">
    <?php
    	$category = get_option('wpns_category');
    	$n_slices = get_option('wpns_slices');
    ?>
    <?php query_posts( 'cat='.$category.'&posts_per_page='.$n_slices.'' ); if( have_posts() ) : while( 
    
    have_posts() ) : the_post(); ?>
    	<?php if(has_post_thumbnail()) : ?>
    	<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    		<?php $thumb_attr = array(
    				'title' => '<h3>' . '<a href="THIS IS WHERE LINK SHOULD GO">' . get_the_title() . '</a>' . '</h3>' . '<h4>' . get_the_excerpt() . '</h4>'
    		); ?>
    		<?php the_post_thumbnail('featured-thumbnail', $thumb_attr );  ?>
    </a>
    	<?php endif ?>
    	<?php endwhile; endif;?>
    	<?php wp_reset_query();?>
    </div>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hyperlink Inside of Array’ is closed to new replies.