• I want to have a related downloads list on various sidebars that are specifically related to the current page/post. Suppose an article has a presentation & questionnaire for downloads. I want them to appear in my sidebar on that page. I’m currently using Advanced Custom Fields (ACF) and Downloads-Monitor (DLM).

    I want this to be something that the user either tags the appropriate post from the download manager, or tags the appropriate download link from the post. Perhaps there’s an existing plugin that I’m unaware of?

    I added a document to the DLM and tried adding a custom field called “related_download” with a value of the slug for the page I’m testing (i.e. events). I attempted to call the new field and see if it matches what the current page’s slug is. If it does, run the proceeding code for the list.

    <div class="widget widget_related_docs">
      <h4>Related Downloads</h4>
      <div class="side-content">
        <ul>
          <?php echo do_shortcode('[downloads category=related-download order=ASC template="my-template"]'); ?>
        </ul>
      </div>
    </div>
    <?php
    /**
     * Detailed download output
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
        exit;
    } // Exit if accessed directly
    
    if ( $dlm_download->get_field('related_download') ) :
      global $post; // get the post meta and search for slug
      $post_slug = $post->post_name;
    
      if ( $dlm_download->the_field('related_download') = $post_slug ) :
    
    ?>
    
    <li>
      <a href="<?php $dlm_download->the_download_link();?>" target="_blank"><?php $dlm_download->the_title();?></a>
    </li>
    
    <?php 
    
      endif;
    endif;
    
    ?>
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thanks for reaching out to us.

    I regret to say this is beyond the scope of our support. Our plugin does not have any related post feature.

    I would suggest contacting 3rd party developers to assist you with the same.

    Thread Starter Buchanan Webmaster

    (@jeffsydor-bipc)

    Thanks Harish. Maybe I was not clear. I’m not trying to have a related post feature. I guess a better question would be something like this.

    Since I am using Advanced Custom Fields (ACF), is there a way to call the content of those ACF fields like how you do with other standard elements?

    For example, if I want the title of a file, I’d use: <?php $dlm_download->the_title();?>

    Can I also do something like: <?php $dlm_download->the_field('location');?>

    Thanks

    @jeffsydor-bipc any luck? I’m trying to figure this out too.

    Thread Starter Buchanan Webmaster

    (@jeffsydor-bipc)

    No this has not been answered.

    Hey Jeff,

    With custom code this is possible but as I mentioned this is beyond the scope of our support. I regret to say we do not offer any assistance with customization.

    Thread Starter Buchanan Webmaster

    (@jeffsydor-bipc)

    Then you should not mark this as resolved. That’s misleading to others, like @imdielawn, that may be looking for this solution.

    Hey Jeff,

    Users looking for same issue can always use search function. This specific group is for our plugin support and hence for anything that is not about bugs is marked as resolved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Making Downloads Monitor work with Advanced Custom Field’ is closed to new replies.