• Resolved Agent 3W

    (@agent3w)


    Hello,

    I’m using shortcode to display download files from one category like that :
    [wpdm_category id=”my-category” toolbar=”0″ paging=”0″ order=”desc” items_per_page=”3″ template=”link-template-default-old”]

    I don’t want to display pagination also : paging=”0″

    PHP Error on front end :
    Notice: Undefined variable: pagination in /…/wordpress/wp-content/plugins/download-manager/tpls/shortcodes/category.php on line 18

    —–
    Plugin dev fix proposal :
    Check if $pagination exists in the template file
    OR declare $pagination = “” before line 341 in wp-content/plugins/download-manager/libs/class.CategoryHandler.php
    —–

    User dev temporarly fix :
    Thanks to the plugin developers, you can easly overwrite the shortcode template.
    – Create file wp-content/themes/egovenz-child/download-manager/shortcodes/category.php
    – Copy the content from wp-content/plugins/download-manager/tpls/shortcodes/category.php
    – Change line 18 to <?php if (isset($pagination)) { echo $pagination; } ?>

    Hope this help.

    WP 5.5.1
    WP DM 3.1.07

    • This topic was modified 4 years, 2 months ago by Agent 3W.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode Category – pagination PHP error AND fix’ is closed to new replies.