• Resolved tnconnect

    (@tnconnect)


    When adding a downloads shortcode to a Post the loop_start and loop_end information is not being processed. My code is:
    [downloads orderby=”title” order=”DESC” category=”Portico” loop_start=”<table class=”dlm”><tr><th>Form</th><th width=”50%”>Description</th><th width=”15%”>Version</th></tr>” loop_end=”</table>” template=”description”]

    I have a custom template that has just a basic:
    <tr>
    <td>(code)</td>
    <td>(code)</td>
    <td>(code)</td>
    </tr>

    The Title, Description and Version do pull on to the page. It’s just not formatting it into a table.

    If I change the custom template in to:
    <table>
    <tr>
    <td>(code)</td>
    <td>(code)</td>
    <td>(code)</td>
    </tr>
    </table>
    Tables are formatted for each document. So the template is being read. I know it worked at one point on posts. I tried rolling back a few versions to 4.4.4 but still not working.

    When adding the same code to a Page it works fine.

    I am currently on WordPress 5.8.3 and PHP 8.1.1

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @tnconnect,

    Seems that you are using double quotes ( " ) where you should use single quote ( '). For example, where you enter class (<table class=”dlm”>) please go with single quote (<table class=\'dlm\'>) so that the shortcode will know what the fragment means.

    Also, seems there are some problems with table elements being displayed, tried using div and seems to work. Don’t know exactly why table elements do not work, but the development team will take a look into it ( you can follow the progress here – https://github.com/WPChill/download-monitor/issues/829 ).

    Kind Regards!
    Razvan

    • This reply was modified 3 years, 1 month ago by Razvan Aldea.
    • This reply was modified 3 years, 1 month ago by Razvan Aldea.
    • This reply was modified 3 years, 1 month ago by Razvan Aldea.
    Thread Starter tnconnect

    (@tnconnect)

    Thank you. Changing from ” to ‘ fixed the issue. I should have known better. It’s just weird why it works on Pages but not Posts with the “.

    Thread Starter tnconnect

    (@tnconnect)

    Actually after looking again at the pages that were working, they didn’t have any double quotes. I just missed it when comparing codes.

    Well, glad it’s OK and everything is working now ??

    Have a wonderful day!
    Razvan

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Downloads shortcode loops issue’ is closed to new replies.