Tuesday, 15 April 2014

php - Disable access from url -


I want to create a custom post type "portfolio", so I had this code in Argus:

 < Code> $ args = array ('label' = & gt; __ ('blabla', 'blabla'), 'description' = & gt; __ (label 'label', 'label', 'label' = & gt ; $ Label, 'support' = & gt; array ('title', 'editor', 'fraction', 'author', 'thumbnail', 'custom field'), 'hierarchical' = & gt; wrong, 'public True_, 'show_in_menu' = & gt; true, taxonomies = & gt; class', 'show_in_admin_bar' = & gt;, 'show_in_nav_menus' = & gt; true,' show_ui '= & gt; Gt; wrong, 'menu_position' = & gt; 5, 'menu_icon' = & gt; 'Dashikon-format-gallery', 'can_export' = & gt; true, 'has_archive' = & gt; true, 'exclude_from_search' = & gt; false, 'publicly acceptable' = & gt; wrong; Query_var '= & gt; portfolio', 'rewrite' = & gt; $ rewrite, 'ability_type' = & gt; 'post');  

Everything is great, But I want to show portfolio items only on home page with PHP. After creating new portfolio item, I can access it from the link which Wordpress generates for me What I want to disable this capability for all users. If it is possible without any redirection.

this

'exclude_from_search' = & gt; True, 'publicly acceptable' = & gt; Wrong,

Do not forget to flush the rules.

If you do not want to access a single portfolio item page, add it:

'query_var' = & gt; Wrong,

And, perhaps, you also want to delete the archives support or even setting

'rewrite' = & gt; Incorrect,


No comments:

Post a Comment