Hi to all,
I’m wondering if is there a way to check if are there any file for a category/tag and show a block of code only if there are some files to show.
In plain English:
[check if there are some file in the “catalogue” category: if true, show the following code]
<h4>Catalogues</>
[wpdm_category id="catalogue" tags="downloadable" toolbar="0" order_by="Date" order="desc" paging="0" cols=1 colspad=1 colsphone=1 template="link-template-default"]
[end check]
The goal is to hide the title if there isn’t any file to download.
Any hint? Thanks in advance.
You can check it with the PHP. the templates are supporting PHP language too. but, you have to do it in the editor.
Thanks.
Thanks for the reply… I’m in the template, what have I exactly to do? A MySQL query or there is a wpdm function to trigger?
You have to put just a condition based on an if-else statement if you know the PHP
Thanks.
The topic ‘Hide a block of code if there are no files to download’ is closed to new replies.