Note that there are some explanatory texts on larger screens.

plurals
  1. POimage permalink PHP problem with Wordpress
    primarykey
    data
    text
    <p>the site is <a href="http://www.christopherwaller.com/wordpress/" rel="nofollow">http://www.christopherwaller.com/wordpress/</a></p> <p>if you take a look on the above site i'm trying to insert a link to a page on each of the images on a carousel, so if you click anywhere on the image it will navigate to a new page. I have created the link i want on the post title text (ie. Look 1, Look 2 etc . . .) by using </p> <pre><code>&lt;h2 class="postitle"&gt;&lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt; </code></pre> <p>but i can't for the life of me find the right PHP to create the same links on each of the carousel photos? </p> <p>I'm still trying to get to grips with PHP if anyone could advise that would be great.thanks </p> <p>this is the PHP</p> <pre><code> &lt;div class="edit"&gt;&lt;?php edit_post_link(); ?&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="postcontent"&gt; &lt;?php $content = $post-&gt;post_content; $searchimages = '~&lt;img [^&gt;]* /&gt;~'; preg_match_all( $searchimages, $content, $pics ); $iNumberOfPics = count($pics[0]); if ( $iNumberOfPics &gt; 0 ) { ?&gt; &lt;?php the_thumb('medium'); ?&gt; &lt;?php } else { ?&gt; &lt;div class="imgframe"&gt;&lt;/div&gt; &lt;?php } ?&gt; &lt;div class="post_content"&gt; &lt;h2 class="postitle"&gt;&lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt; &lt;?php the_excerpt(); ?&gt; &lt;?php wp_link_pages('&lt;p class="pages"&gt;&lt;strong&gt;'.__('Pages:').'&lt;/strong&gt; ', '&lt;/p&gt;', 'number'); ?&gt; &lt;div class="post_meta"&gt; &lt;div class="author"&gt;&lt;?php the_author(); ?&gt;&lt;/div&gt; &lt;div class="date_meta"&gt;&lt;?php the_date(); ?&gt;&lt;/div&gt; &lt;div class="category_meta"&gt;&lt;?php the_category(', '); ?&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="postbg_bottom"&gt;&lt;/div&gt; &lt;div class="social_links"&gt; &lt;a class="read" title="Read the rest of this post" href="&lt;?php the_permalink(); ?&gt;"&gt;read more&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php endwhile ?&gt; &lt;div class="navigation"&gt; &lt;div class="nxt_page"&gt;&lt;?php previous_posts_link('New Entries »', 0); ?&gt;&lt;/div&gt; &lt;div class="prv_page"&gt;&lt;?php next_posts_link('« Old Entries', '0') ?&gt;&lt;/div&gt; &lt;/div&gt; &lt;?php endif ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;!--CONTENT END--&gt; </code></pre> <p>and the CSS</p> <pre><code>/* Easy Slider */ #slider ul, #slider li{margin:0;padding:0;list-style:none;} #slider li, #slider2 li{ width:1000px;height:1100px;} #nextBtn{display:block; width:13px; height:14px; position:relative; left:0px; top:0px; z- index:1000; right:120px; top:-718px; float:left; left:840px; margin-right:20px; } #prevBtn{display:block; width:13px; height:14px; position:relative; left:300px; top:0px; z-index:1000; right:120px; top:-718px; float:left; left:-100px; margin-right:20px; } #prevBtn{ left:-20px;} #nextBtn a, #prevBtn a{ display:block;position:relative;width:13px;height:14px; background:url(images/sl_left.png) no-repeat 0 0;} #nextBtn a{ background:url(images/sl_right.png) no-repeat 0 0;} .graphic, #prevBtn, #nextBtn{padding:0; display:block; overflow:hidden; text-indent:-8000px;} /* Easy Slider END */ /*SLIDER END*/ </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload