Reputation: 11
can any one help to solve a problem? Just For example: If I have one site wpnpl.com.np I wannt to give access to the files of a plugin like if they type wpnpl.com.np/npl they will access the features of the plugin How to do this???Any Idea
Upvotes: 1
Views: 50
Reputation: 63
First create plugin short code in your plugin core file
function bartag_func( $atts ) {
$atts = shortcode_atts( array(
'foo' => 'no foo',
'baz' => 'default baz'
), $atts, 'bartag' );
return "foo = {$atts['foo']}";
}
add_shortcode( 'bartag', 'bartag_func' );
After that create a page in wp-admin with slug npl and content with
[bartag foo="bar"]
Upvotes: 1