Forum Replies Created
-
AuthorPosts
-
dwest100Member
Thanks! I was able to make it work with that tidbit of information
dwest100MemberAny answers regarding this?
dwest100MemberClarification for other issues I’ve noticed in tinkering with this is as follows:
First Scenario-
User clicks image from gallery inserted in post.
Result is detail page.
User clicks view gallery on detail page.
User goes to home page of site (blog) instead of post where gallery was inserted.
Second Scenario-
User clicks image from gallery inserted in post.
Result is detail page.
User cycles to next image in detail page one or more times.
User clicks view gallery on detail page.
User is taken to previous image within the detail page.
Third Scenario-
User clicks image from gallery inserted in post.
Result is detail page.
User selects quantity and adds item to cart.
User clicks view gallery in cart success message.
User is returned to detail page.
Fourth Scenarion-
Similar to others but user is in cart and clicks continue shopping and is returned to detail page…should go to original blog post.
dwest100MemberCool! Thanks much!
dwest100MemberThis is true. However, once the user is at the shopping cart and presses “back to gallery” they go to the gallery page, not the original post. That I need to fix so it returns to the original post. How can I do that?
Thanks!
dwest100MemberBeginning with //explode the search string…down to…$querystr =
And I deleted all the code that searched the other fields and merged the results.
If you take a look at the original file in the plugin you can easily see what was omitted/replaced with the new code.
dwest100MemberSure! Here’s the code
It only searches the descriptions of the images. Those are not used by Google so you can fill them up with various keywords users might search without triggering Google’s stuffing flags. Alt tags can then be kept to the ideal minimums for google.
Finds singular forms of plural words (bird is found in birds) and partials of words (finds burr in cockleburr) and does so with multiple keywords.
<?php
class WPSSearchImages
{
function __construct() {
//NOP
}
//Searches all gallery photos using multiple keywords and returns an array of results containing post IDs (ie, image IDs)
static function perform_gallery_keyword_search($keyword)
{ //Handles the keyword search of galleries and photos
global $wpdb;
//Clear the previous search result array if it exists
WPSSession::drop("last_search_results");
WPSSession::drop("last_search_term");
//Perform query
// always escape search string
//$queried = mysql_real_escape_string($keyword);
// explode the search string
$keywords = explode(" ",$keyword);
foreach($keywords as $k){
$sql .= "AND $wpdb->posts.post_content LIKE '%$k%' ";
}
$querystr = "
SELECT DISTINCT $wpdb->postmeta.post_id
FROM $wpdb->posts, $wpdb->postmeta
WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id
AND $wpdb->postmeta.meta_key = '_wpps_gallery_id'
AND $wpdb->posts.post_type = 'attachment'
$sql
ORDER BY $wpdb->postmeta.post_id ASC
";
$results = $wpdb->get_results($querystr,ARRAY_A);
//Extract only the post id and put into array
$s_data = array();
foreach($results as $res)
{
$s_data[] = $res;
}
$unique_results = array_unique($s_data); //Remove duplicates
//Store result array in session variable
if(empty($unique_results)){
return null;
}else{
$searched_photos_array = WPSGalleryItem::getSearchedPhotoItemsArray($unique_results);
WPSSession::set("last_search_results", $searched_photos_array);
WPSSession::set("last_search_term", $keyword);
return $searched_photos_array;
}
}
}
?>
dwest100MemberYep I figured that out about two hours ago
Thanks!
dwest100MemberRegarding the tagging for local search…I have a plugin which assigns “media tags” in bulk to any series of images. Where could I edit your plugin to include those in the image search function?
Thanks!
dwest100MemberLocal search of images only.
dwest100MemberThey would need to be link type bread crumbs to go back and forth between categories. For instance:
Main categories–> category products list –>product
This way visitors can get back to the product list or the main category list easily without hitting the back button.
This add-on does everything on the same page, which is nice and clean. But the URL is always for this page. Can it be such that the category, product category list, and product detail all add a slug to the URL so Google can identify them as individual pages in the site? Currently the add-on is not good for SEO because no matter what is on the page the URL is the same
Thanks much for a super product! It is great!
dwest100MemberHi,
I am using the Browse by category add-on so how do I add category breadcrumbs? I can modify the plugin with some direction from you
Thanks!
-
AuthorPosts