English 中文(简体)
限制使用言语中的类别页
原标题:Limiting access to category pages in Wordpress

I ve recently installed Jason Tadlock s Members plugin which allows restriction of pages and posts but I have built a site using category pages for the majority of the pages. Could anyone tell me how to apply these restrictions to categories or to display the category template as a "page". Ideally, I d like the links not to show up in the navigation either so that those who don t have access won t know what they are missing. Thanks in advance.

问题回答

我在金字节上走过了句子,我很喜欢,尽管它的意图并非具体地用于分类网页,但你仍然能够在其类别内使用其短码特征。 php模板是为了建立你希望的内容。

如果看不见你的法典,就很难给你必要的答案,但这应该让你开始正确的方向:

<?php
$navigation =  your_navigation_html ;
$content =  [access role="editor"] .$navigation. [/access] ;
echo do_shortcode($content);
?>

这个例子将掩盖你们的航行,而只是编辑。





相关问题
Wrap stray text in <p> tags

Wordpress issue.. how do I wrap stray text in P tags? Example: Before- <div class = "content"> <img src = "hello.jpg"/> <h1>Introduction</h1> Hello! this is ...

Using jQuery Plugins with Wordpress

Having a bit of trouble using jQuery plugins (Superfish, jQuery UI, etc) using Wordpress. Everything works fine in my plain non-Wordpress site, but Wordpress seems to conflict with JQuery. There must ...

WordPress Data Storage Efficiency

I ve been asked to review a WordPress plugin of sorts and try to find ways of making it faster. The premise of this plugin is basically to store a bunch of users and shifts and appointments and ...

Why can t I properly style a blockquote in Wordpress?

On the design I just created for my website, I have a blockquote styled with two quote images using the span technique in css: blockquote { background-image: url(images/openquote.jpg); background-...

How does the WordPress <!--nextpage--> tag actually work?

What happens? I m guessing that somehow the post or page is parsed before displaying, and then just split into two methods? I can t seem to find any documentation on how the underlying <?php ...

Wordpress Plug-ins: How-to add custom URL Handles

I m trying to write a Wordpress Plug-in but can t seem to figure out how you would modify how a URL gets handled, so for example: any requests made for: <url>/?myplugin=<pageID> will ...

热门标签