Wordpress settings only allow login users to view short code call problems.

Source: Internet
Author: User
In function. the following code is inserted in php to enable the login user to view the content of the article. insert [members_only] [menmbers_only] where the user needs to view the content of each article. however, after I use the FooGallery short code in my article, FooGallery cannot be displayed normally. For more information, see... in function. the following code is inserted in php to enable the login user to view the content of the article. insert [members_only] [/menmbers_only] where the user needs to view the content of each article.

However, after I use the FooGallery short code in my article, FooGallery cannot be displayed normally. How can I solve this problem?
[Members_only]
[Foogallery id = "141"] [foogallery id = "141"] is displayed after the article is published, and no short code is called.
[/Menmbers_only]

Add_response code ('members _ only', 'Members _ only_response code '); function members_only_response code ($ atts, $ content = null) {if (is_user_logged_in ()&&! Empty ($ content )&&! Is_feed () {return $ content;} return 'You can learn only after you register and purchase a course ~ ';}

Reply content:

The following code is inserted in function. php to enable users to view the content of the article. In each article, insert [members_only] [/menmbers_only] where users need to log in.

However, after I use the FooGallery short code in my article, FooGallery cannot be displayed normally. How can I solve this problem?
[Members_only]
[Foogallery id = "141"] [foogallery id = "141"] is displayed after the article is published, and no short code is called.
[/Menmbers_only]

Add_response code ('members _ only', 'Members _ only_response code '); function members_only_response code ($ atts, $ content = null) {if (is_user_logged_in ()&&! Empty ($ content )&&! Is_feed () {return $ content;} return 'You can learn only after you register and purchase a course ~ ';}

Return do_response code ($ content );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.