[nextgen gallery] get_permalink(?)
-
ciao! i have to call get_permalink funztion to get this url
https://www.website.com/post_title.html?pid=18
I have the title of post and the id of photo
$galleryID = stripslashes(nggGallery::i18n($picture->gid)); $gallerypage = $wpdb->get_var("SELECT pageid FROM $wpdb->nggallery WHERE gid = '$galleryID' "); $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE id = '$gallerypage' ");
this is the link I have to change:
$out .= '<a href="' . $picture->imageURL . '" title="' . stripslashes(nggGallery::i18n($picture->description)) . '" ' . $thumbcode . ' >'; $out .= '<img title="' . stripslashes(nggGallery::i18n($picture->alttext)) . '" alt="' . stripslashes(nggGallery::i18n($picture->alttext)) . '" src="' . $picture->thumbURL . '" />'; $out .= '</a>' . "\n";
I tried so
$out .= '<a href="' . get_permalink().'?pid='.stripslashes(nggGallery::i18n($picture->pid)). '" title="' . stripslashes(nggGallery::i18n($picture->description)) . '" ' . $thumbcode . ' >';
it links to the article if I compose the link it always change it to goto?pid=N
do you know which parameters i have to give to get_permalink function??
- The topic ‘[nextgen gallery] get_permalink(?)’ is closed to new replies.