ridinglowest
Forum Replies Created
Viewing 1 replies (of 1 total)
-
No replies so last night I deleted my wordpress installation and started over..
After importing content, uploading template files, images etc. I tried again and was able to isolate the the issue to my shortcode function. But this worked fine in ver 2.6 and now in 3.0 has issues but posts that came from my prievious installation still work and they have my shortcode.
Any Ideas
// [myrelatedProjects jskey="Flash,Control System"] function myrelatedProjects2($atts) { extract(shortcode_atts(array( "jskey" => '' ), $atts)); $dablogurl = get_bloginfo("wpurl"); $jstags = $jskey; $jshtml = "<p style='margin-left:20px;'>"; $jsstep = 4; //--- now lets pull 5 projects with the same tags ------------------>> $getjsPosts = new WP_Query("cat=95,97,94&tag=".$jstags."&post_type=post&orderby=date&order=ASC"); while($getjsPosts->have_posts()) : $getjsPosts->the_post(); $dapostid = get_the_ID(); $jsImageUrl3 = get_post_meta($dapostid, 'imageSlider', true); $jsPostUrl = get_permalink($post->ID); // $jsImageUrl4 = explode(".", $jsImageUrl3); $jsImageUrl = explode("-", $jsImageUrl4[0]); $jsImageUrl2 = ""; $jsImageAlt = get_the_title($post->ID); for ($jstemp=0; $jstemp<=sizeof($jsImageUrl)-2; $jstemp++){ $jsImageUrl2 .= $jsImageUrl[$jstemp] . "-"; } if ( $jsImageUrl2 == "" ){ $jsImageUrl2 = $jsImageUrl4[0] . "-"; } $jsImageUrl2 .= "100x100.jpg"; $jsstep--; if ($jsstep >= 0){ $jshtml .= '<a class="view" href="'.$jsPostUrl.'"> <img class="daborder2" style="margin-left: 5px;" src="'.$dablogurl.'/wp-content/uploads/'.$jsImageUrl2.'" alt="'.$jsImageAlt.'" width="100" height="100" /> </a>'; } /*if ($jsstep == 0){ }*/ endwhile; $jshtml .= "</p>"; return $jshtml; } add_shortcode('myrelatedProjects', 'myrelatedProjects2');
Viewing 1 replies (of 1 total)