WordPress.org

Ready to get started?Download WordPress

Forums

WP Document Revisions
[resolved] Shortcodes doesnt work (8 posts)

  1. Knut23
    Member
    Posted 2 years ago #

    Hello!

    I have for two nights now been trying to get the shortcodes to work, without success. The last thing I did was to check the source code of may page where the shortcode should be working it's magic. All i get is an unordered list!!! Like this:
    <ul class="documents"></ul>
    I tried the hortcode for gallery "[gallery]" (without quotes)and it worked .

    Anyone have any suggestions on what might be causing this?

    Thanks in advance!
    /Richard

    http://wordpress.org/extend/plugins/wp-document-revisions/

  2. Knut23
    Member
    Posted 1 year ago #

    Hi again!

    So I am the only one with this problem? Have I perhaps missed some vital "activation" of the shortcodes? If so, could anyone please point me to where this is done?

    Thanks in advance again!

    /Richard

  3. Ben Balter
    Member
    Plugin Author

    Posted 1 year ago #

    Please make sure all the documents you want visible are public. You can verify this by navigating to /documents/

  4. Knut23
    Member
    Posted 1 year ago #

    Thanks for the reply Benjamin!

    Sorry for taking so long to get back. I thought I got it right when I got the document list with the below mentioned method. But when I took a closer look I still was stuck.

    If i use /documents/ I get a 404 from the server (not the WordPress 404!). I guess this is a question of permalink settings... If I use ?post_type=document instead I can see the document list. Both private/public (while logged in) and public (not logged in).
    But, when it comes to shortcodes I get only public documents from the shortcode [documents].

    I am also using the Members plugin and custom categories for the documents. If that matters...

  5. Knut23
    Member
    Posted 1 year ago #

    I just noticed that all private documents will come up in a search, if I'm logged in. If not logged in, only public documents show up. Does that perhaps give anyone an idea of what is wrong?

  6. Ben Balter
    Member
    Plugin Author

    Posted 1 year ago #

    Assuming you are not passing any conditions to the shortcode, all the shortcode does is fire get_documents() which is itself, a wrapper for WordPress's native get_posts() function.

    It could be that the revisions aren't properly saving, which could cause a problem further down the pipeline, but other than that it shouldn't touch WordPress's core functionality.

    I'd recommend updating to the latest version of the plugin and WordPress if you haven'y already, and disabling all other plugins. If the problem persists, and you're a bit familiar with code, you can try to recreate the problem either in WP Debug Bar's console, or by adding commands to output documents in the shortcode function, as well as get_documents.

  7. fredricke.engels
    Member
    Posted 1 year ago #

    Hi I just installed WPDR and WPDR simple downloads.
    I wanted to create shortcode for file categories, but the following doesnt work
    [documents category_name="mr"], mr is the slug for the file category i created.
    But [documents workflow_state="final"] works perfectly fine.
    Is it because WPDR not aware of file categories which got introduced newly in WPDR simple downloads?

  8. fredricke.engels
    Member
    Posted 1 year ago #

    The File Categories of WPDR simple downloads are getting stored as "wpdr-file-categories".
    I tried inserting
    $args['wpdr-file-categories']='mr';
    in get_documents() and it worked perfectly fine.
    But [documents wpdr-file-categories='mr'] shortcode doesnt work.
    Can anyone tell me where should i check to enable shortcode support for wpdr-file-categories.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.