Paid Content Shortcode
-
Hello,
I’ve been searching around everywhere for a solution to this and unfortunately have not found one yet. It seems a number of other people are also trying to get the paid content module to work on a specific piece of content within a post/page rather then the whole post/page itself. Oddly I havn’t come across the idea of using a shortcode to satisfy this. Would it be possible to create a shortcode to wrap around whatever content you wanted users to pay for? It would go something like this…
[paid-content] You’re paid content would go here. [/paid-content]
It would behave exactly the same way as it does now but offer much more flexibility on what content could be paid for. Please somebody can you help with this??
Thanks
-
Can you post a link to an example?
hi J.D. Grimes,
http://beezeeking.uhostall.com/
[ redacted, seriously do not post that here ]i published post in the front-end,but the protect code couldn’t function?in the plugin “wp user frontend”,i edit the file “wpuf-functions.php” as you writed code,thank you for giving directions.
@beezeeking Please do not post login credentials on this forum again. I strongly encourage you to change the password for that account.
oh,J.D. Grimes
it couldn’t be published the username and password ,fllow is an example:
http://beezeeking.uhostall.com/welcom-j-d-grimes/
the field “cf_site_address” couldn’t protect?Try this:
if ( $meta ) { $meta = do_shortcode( '[protect points="50"]' . $meta . '[/protect]' ); $extra .= sprintf( '<li><label>%s</label> : %s</li>', $field->label, $meta ); }J.D. Grimes,thank you!
i have edited the code, all fields have been protected,like this:
http://beezeeking.uhostall.com/welcom-j-d-grimes/
Does this Judgement sentence is wrong?I see now what I did wrong before. This code should protect only the address field:
if ( $meta ) { // If this is the site address. if ( 'cf_site_address' == $field->field ) $meta = do_shortcode( '[protect points="50"]' . $meta . '[/protect]' ); else $meta = make_clickable( $meta ); $extra .= sprintf( '<li><label>%s</label> : %s</li>', $field->label, $meta ); }great,J.D. Grimes,so cool
i edited the code,everything is ok,thank you for your directions and help,hope you have a good time! haha
The topic ‘Paid Content Shortcode’ is closed to new replies.