Pay with a like working with custom fields

I got the pay per like to work on my website but how do get it do work with custom fields. For example, my template allows me to add Vimeo videos into a custom field (not in the post description), for an example look at this post http://themes.okaythemes.com/radius/2012/03/04/the-city/ I would like to members to link before seeing the entire content including the video… at the moment it only blocks the content below video. How can I achieve this??

  • aecnu
    • WP Unicorn

    Greetings maitlandd,

    Thank you for bringing this custom coding issue to our attention.

    Though this clearly falls outside our mandate for support including that I am not a coder, I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Hakan
    • The Incredible Smush

    Hi,

    You should add Pwal inside your template php file. An example is given in Customization Instructions part of the settings:

    Example: Suppose that the content of a post type is displayed like this: <?php echo custom_description(); ?>. Then edit that part of the template like this:

    <?php
    if ( function_exists( 'wpmudev_pwal' ) )
    echo wpmudev_pwal( custom_description() );
    else
    echo custom_description();
    ?>

    Cheers,

    Hakan

  • Hakan
    • The Incredible Smush

    Hi,

    Well, I thought that there would be a function to display custom field plus the post content.

    Normally PWAL is designed to modify post content (may or may not include some custom fields), not any html code, but you can try this:

    <?php
    if ( function_exists( 'wpmudev_pwal' ) )
    echo wpmudev_pwal( get_post_meta($post->ID, 'okvideo', true) );
    else
    echo get_post_meta($post->ID, 'okvideo', true);
    ?>

    You must set reveal method as Automatic and excerpt length as a big number, say 1000 to be sure.

    Edit: Excerpt length should be zero.

    Please note that this is not tested for such an application and it heavily depends on preceding lines on your template.

    Let us know about the result.

    Cheers,

    Hakan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.