#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
General Discussions
Widget for unregist...
 
Share:
Share
Tweet
Share
Notifications
Clear all

New Feature Widget for unregistered users

    Last Post
RSS

st7878
Posts: 103
 st7878
Topic starter
October 20, 2021 9:31 pm
(@aima-forum)
Estimable Member
Joined: 2 years ago

I have created a shortcode in the function.php file that only shows content to unregistered users:

function no_logged_user_content( $atts, $content = null ) {
	if ( is_user_logged_in() && !is_null( $content ) && !is_feed() ) {
		return '';
	}
	return $content; 
}
 
add_shortcode( 'member', 'no_logged_user_content' );

Now in the text widget, I can only add content for unregistered users:

[member]Information only to unregistered[/member]

Please help to refine this code so that you can differentiate information for admins, moderators, registered, guests ... Make several shortcodes for each user group.

Forum Page URL
https://eworld.com.ua/
This topic was modified 7 months ago 2 times by st7878

My forum powered by wpForo v1.9.9 (theme GeneratePress v3.0.2)

Topic Tags
shortcode widget sidebar
1 Reply
Chris
Posts: 1358
 Chris
Admin
October 21, 2021 10:48 am
(@chris)
Support Team
Joined: 10 months ago

Hi @aima-forum,

wpForo has custom development, which can make that work for you, if you are interested contact sales[at]gvectors.com

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • Topic Prefix widget and Allowed Usergroups
    8 months ago
  • Category shortcodes
    9 months ago
  • Registration Page shortcode Request
    9 months ago
  • Page for Recent Topics
    1 year ago
  • Shortcode not displaying correctly in email
    2 years ago
Topic Tags:  shortcode (30), widget (28), sidebar (18),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • wpforo widgets not showing

    By umais, 11 hours ago

  • Error 2253 Root Cause

    By aaronmckeon, 13 hours ago

  • Forum page

    By Charlespresh, 2 days ago

  • How can I make notification bell appear site wide?

    By marios, 2 days ago

  • wpForo not working correctly with Silk browser on Fire 7 Tablet

    By starman71, 2 days ago

  • Style Guests see "Add Topic" button - even if settings are right

    By DanielOfAnu, 2 days ago

Topic Tags

  • translation49
  • css49
  • plugin conflict48
  • seo45
  • new features43
  • buddypress42
  • ultimate member40
  • avatar40
  • forum40
  • moderation38
  • login38
  • registration36
  • threaded layout35
  • cache33
  • editor32
  • menu32
  • shortcode30
  • spam29
  • phrases28
  • forum accesses28
View all tags (2161)

Recent Posts

  • RE: wpForo 2 Major Update is Imminent!

    Damn, i was really looking forward to this feature as I...

    By Macky, 7 hours ago

  • RE: How can i remove the Buttons under Name?

    @y-3 ##wpforo #wpforo-wrap .wpfl-1 .wpforo-post .wpf...

    By Tutrix, 9 hours ago

  • RE: Error 2253 Root Cause

    Hi @robert - Thanks. I have reviewed those threads and...

    By aaronmckeon, 9 hours ago

  • wpforo widgets not showing

    Hello I cant see wpforo widget in the WordPress widge...

    By umais, 11 hours ago

  • RE: When is the Update Coming?

    @robert thanks mate 🙂

    By Macky, 17 hours ago

  • RE: Guests see "Add Topic" button - even if settings are right

    Hi @danielofanu, Check this post please:

    By Chris, 21 hours ago

  • RE: wpForo not working correctly with Silk browser on Fire 7 Tablet

    Add the forums menu items to your main menu 😉

    By Tutrix, 1 day ago

Share:
Share
Tweet
Share
  Forum Statistics
20 Forums
9,747 Topics
49.4 K Posts
9 Online
43.2 K Members

Latest Post: wpForo 2 Major Update is Imminent! Our newest member: togetherboston17 Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation