Created
October 17, 2017 13:56
-
-
Save barrykooij/9e3b26aa8c7becb1a9ac7c61dafd2235 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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/>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment