Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get the connected posts
- $my_connected_downloads = Post_Connector::API()->get_children( "your-dlm-connection", get_the_id() );
- // Check
- if ( count( $my_connected_downloads ) > 0 ) {
- // Loop
- foreach ( $my_connected_downloads as $my_connected_download ) {
- $download_obj = new DLM_Download( $my_connected_download->ID );
- // Display the title with a link
- echo "<a href='" . $download_obj->get_the_download_link() . "'>" . $download_obj->get_the_title() . "</a><br/>";
- }
- }
Add Comment
Please, Sign In to add comment