Tagged: image
-
AuthorPosts
-
February 8, 2015 at 7:06 pm #392761
Very much appreciate the Enfold theme.
I’m using both Groups and WooCommerce Groups to limit access to specified posts to Members. I have a “Recent News” area (Magazine Content Element) on my home page that lists posts in the News category. Some of them are for members only, some open to everyone. Groups is a popular free plugin that allows you to restrict access to content to those in a specified Group.
Is there a way to show an “indicator” that informs the site visitor a specific link is for “Members Only” in the Magazine element?
I found the ability to display the tabs including the option to select categories (All / Member News / News) but it would be preferred if I could show the category or some sort of indicator right next to the date.
Imagine something like this…
http://mtac.spidercreations.net/wp-content/uploads/2015/02/member-content.jpgSuggestions? Thank you!
February 10, 2015 at 12:10 am #393417Hi,
Can you post the link to the page in question (where the Magazine element is)?
Regards,
JosueFebruary 10, 2015 at 12:11 am #393418This reply has been marked as private.February 10, 2015 at 11:13 pm #394078Hi!
Base on the Group’s plugin documentation you can use their shortcodes to filter visibility for members and non-members: http://www.itthinx.com/documentation/groups/
[groups_member group="Registered"] Only registered users can see this text. [/groups_member]
You can edit config-templatebuilder > avia-shortcodes > magazine.php. Maybe, create a case logic somewhere inside this code on line 582:
$output .= "<header class='entry-content-header'>"; $output .= "<time class='av-magazine-time updated' {$markupTime}>".$time."</time>"; $output .= $separator.$author_output; $output .= "<{$titleTag} class='av-magazine-title entry-title' {$markupTitle}>{$title}</{$titleTag}>"; $output .= "</header>";
Cheers!
IsmaelFebruary 11, 2015 at 3:25 pm #394378Thank you. The show/hide shortcut I’m familiar with, but it won’t apply to this situation since it’s logic built into the magazine.php code.
Concerning your case logic and code provided … I have NO CLUE as to what this does. Not familiar with the code at all. What would it do?
Since it’s editing the template, would I do this in a child theme?
Thank you for your help.
Steve
February 11, 2015 at 9:09 pm #394670Hi Steve!
Open /enfold/config-templatebuilder/avia-shortcodes/magazine.php and change this part:
$output .= "<article class='hentry av-magazine-entry av-magazine-entry-id-".$entry->ID." av-magazine-format-{$format} av-magazine-type-{$type} av-magazine-entry-".$entry->loop." av-magazine-entry-".$style." {$extraClass}{$magazine_category[0]->slug}' {$markupEntry}>";
To:
$magazine_category = get_the_category($entry->ID); $output .= "<article class='hentry av-magazine-entry av-magazine-entry-id-".$entry->ID." av-magazine-format-{$format} av-magazine-type-{$type} av-magazine-entry-".$entry->loop." av-magazine-entry-".$style." {$extraClass}{$magazine_category[0]->slug}' {$markupEntry}>";
Then add this to Quick CSS:
.av-magazine-entry.MEMBERS_ONLY_CATEGORY_SLUG_HERE .av-magazine-time:before{ content: "Members Only"; margin-right: 3px; color: red; }
Refer to the following article on how to implement this mod on a child theme:
kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/Cheers!
JosueMarch 18, 2016 at 2:59 pm #600304Hi Genius’
if I could take advantage of this topic I would be most grateful :-) We are using Groups plugin and client wants to be able to add a logo to each group such that when each member comes into that group the LOGO SPECIFIC TO THAT GROUP shows up. e.g. IBM members only see IBM logo etc.?
March 18, 2016 at 11:54 pm #600582Not sure if we can help with that but feel free to create a new topic including a link to the site + additional details.
-
AuthorPosts
- The topic ‘Using Magazine Content Element – Indicate Member-Only Content Based on Groups’ is closed to new replies.