Monday, August 15, 2022
HomeWordPress Developmentplugins - use EDD Content material Restriction for limiting php in template

plugins – use EDD Content material Restriction for limiting php in template


edd prohibit content material plugin creates this shortcodes and these are working in pages and posts :

[edd_restrict id="any"]pattern restricted html or textual content[/edd_restrict]

however i need to use it in my theme not within the posts or pages. i attempted this :

<?php echo do_shortcode( '[edd_restrict id="any"]' pattern php '[/edd_restrict]' );?>

however theme reveals me deadly error. so how can i take advantage of this shortcodes in wordress theme? pattern textual content right here might be a php code that i need to prohibit.

need to put the road under between these shortcodes in my single.php in wordpress :

<li><?php if(get_post_meta($post->ID, 'obtain',true)!= ""){echo "<a href="https://wordpress.stackexchange.com/questions/408590/".get_post_meta($post->ID,"obtain',true)."' > دانلود با لینک مستقیم</a> ";} else { echo ""; } ?>
<?php if(get_post_meta($post->ID, 'download32',true)!= ""){echo "<a href="https://wordpress.stackexchange.com/questions/408590/".get_post_meta($post->ID,"download32',true)."'>لینک مستقیم نسخه 32bit / </a> ";} else { echo ""; } ?> 
<?php if(get_post_meta($post->ID, 'download64',true)!= ""){echo "<a href="https://wordpress.stackexchange.com/questions/408590/".get_post_meta($post->ID,"download64',true)."'>لینک مستقیم نسخه 64bit </a> ";} else { echo ""; } ?>
<?php if(get_post_meta($post->ID, 'downloadwin',true)!= ""){echo "<a href="https://wordpress.stackexchange.com/questions/408590/".get_post_meta($post->ID,"downloadwin',true)."'>دانلود نسخه ویندوز  </a> ";} else { echo ""; } ?></li>

or is that this anyway to limit customized fields in wordpress with edd content material restriction? all these are customized fields that i need to restrics.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments