Quantcast
Channel: WordPress.org Forums » [WP-Filebase Download Manager] Support
Viewing all articles
Browse latest Browse all 1341

Mariusz on "[Plugin: WP-Filebase Download Manager] How to check if post type has a file? (+Advanced Custom Fields plugin)"

$
0
0

Hi
How can I check if filebase attachment was added into the post type?

I don't add a shortcode into WYSWIG field now but I call attachments in my post-type like:

<?php if(get_field('zestaw-dokumentow')) {?>
<div class="jwts_tabbertab">
   <?php echo do_shortcode('[wpfilebase tag=attachments ]'); ?>
</div>
<?php } ?>

Now can I check if attachent has been added?

I tried the code:

<?php if ( is_attachment() ) { ?>

<div class="jwts_tabbertab">
   <?php echo do_shortcode('[wpfilebase tag=attachments ]'); ?>
</div>

<?php } else { ?>
<?php } ?>

It's for regular post type attachemnt, not filebase one and I don't know how to to check if file attachment was added.

Any ideas?

http://wordpress.org/plugins/wp-filebase/


Viewing all articles
Browse latest Browse all 1341

Trending Articles