• Resolved rocketmediauk

    (@rocketmediauk)


    Hi,

    I am using pods in conjunction with WP WordPress Manager. I have a POD setup with a relationship field that links to a WP Download Manager Post.

    I now want to display a download link for the WP download Manager post (I am creating a POD template to do this), which usually I would do this with: echo do_shortcode(“[wpdm_package id=’???’ template=’link-template-button’]”)

    The ID of the WP Dwonload Post I can get with magic link {@resource_link_protected.ID}, but I am struggling to use it to display the shortcode

    I have tried

    echo do_shortcode(“[wpdm_package id='{@resource_link_protected.ID}’ template=’link-template-button’]”)

    and

    $protected_id = ‘{@resource_link_protected.ID}’;
    echo do_shortcode(“[wpdm_package id=’$protected_id’ template=’link-template-button’]”)

    If I do
    $protected_id = ‘1554’;
    echo do_shortcode(“[wpdm_package id=’$protected_id’ template=’link-template-button’]”)

    Then I get the download link, So I am struggling getting {@resource_link_protected.ID} into a variable or use in a shortcode

    Any Ideas?

Viewing 4 replies - 31 through 34 (of 34 total)
  • Thread Starter rocketmediauk

    (@rocketmediauk)

    Thanks Paul, appreciated you would take the time to investigate this with such depth.

    I will have a look through the code and have a test. TY

    Plugin Support Paul Clark

    (@pdclark)

    Hmm… make sure:

    • The linked resource post type and the linked WPDM post have the same post title
    • The current user is assigned to a branch
    • There’s resources with the branch name at the end

    Even if there are no resources found, it should display a message to that effect. The resource list should display both in the editor and the front end once a base resource is selected in the block settings.

    Thread Starter rocketmediauk

    (@rocketmediauk)

    Hi Paul, I edited my post to remove the bit I missed as I read the notes in the plugin and disabled overriding WP metadata and it worked.

    I am attempting to adjust the plugin so that it only shows the branded resource it available and the standard one it not which I think I have achieved with

    				if ( !empty( $branch_resources_html ) ) {
    				  printf(
    					  '<div>%s</div>',
    					  $branch_resources_html
    				  );
    				}else if( empty( $branch_resources_html ) ) {
    				  printf(
    					  '<div>%s</div>',
    					  $main_resource_html
    				  );
    				}
    Plugin Support Paul Clark

    (@pdclark)

    Great, good to hear.

    The else if could just be an else since the conditions are exact opposites of each other.

    Best wishes for your project.

Viewing 4 replies - 31 through 34 (of 34 total)
  • The topic ‘Third Party Shortcode and POD value’ is closed to new replies.