PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
Jason Caldwell wrote:Developers: please make sure that your plugin is using the WP_Query class, and please make sure that your Ajax request follows the WordPress standard of using /admin-ajax.php.
msaari wrote:If you want to adjust the way protected posts are managed, you can write a function that hooks to relevanssi_post_ok hook. Copy (and unhook) the default function and remove the part about s2member, that will make Relevanssi work like it did before.
msaari wrote:Now Relevanssi is showing posts if s2member says it should.
$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"]
<?php
$alt_view_protect = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"];
$completely_hide_protected_search_results = (strpos($alt_view_protect, "all") !== false || strpos($alt_view_protect, "searches") !== false) : true : false;
if(is_permitted_by_s2member(123))
{
// Show title and excerpt, even full content if you like.
// The current User/Member has access to Post or Page ID: 123.
}
else if(!is_permitted_by_s2member(123) && $completely_hide_protected_search_results === false)
{
// Show title and excerpt. Alt View Protection is NOT enabled for search results. However, do NOT show full content body.
// The current User/Member has no access to this content, but Alt View Protection is NOT enabled for search results.
// So in this case, s2Member site owners would expect to see protected titles/excerpts in search results.
}
else /* Do NOT show the search result at all. */
{
// Hide this search result completely.
// The User does not have access to this content, and Alt View Protection IS enabled for search results.
}
?>
Certainly, that would be just fine to do that.msaari wrote:With the option 2 ("Show title and excerpt."), is showing the results of get_the_excerpt() ok?
msaari wrote:Great. Relevanssi Premium 1.6 now has upgraded s2member support and the free version will have it too in the next release.
Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest