• Resolved lauyen

    (@lauyen)


    Hello, I can’t get the category shortcode to display anything. I’m just using the shortcode from the category page and it’s not showing any of the PDF’s I’ve placed inside the category. It just shows “Open Book”.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author deip

    (@deip)

    Hi @lauyen ,

    Make sure you have added the PDF source to the flipbooks. They are currently blank.

    Best Regards,
    Deip

    Thread Starter lauyen

    (@lauyen)

    @deip thanks for replying. Yes I’ve uploaded all the PDF files and linked them to their category.

    Plugin Author deip

    (@deip)

    @lauyen , @iamnocremile Are the individual shortcodes for those working?

    Thread Starter lauyen

    (@lauyen)

    @deip, yes they are. I just updated my test page with some individual PDF’s that should appear in the categories.

    Plugin Author deip

    (@deip)

    @lauyen , Now try adding these books with post id 114, 123 to the category 2007 or 2008 and see if the category is still working.

    Thread Starter lauyen

    (@lauyen)

    @deip They are already in those categories

    Plugin Author deip

    (@deip)

    @lauyen If they are already in the categories, yet not showing them. Then we may need to look into your WordPress admin area.

    We also suggest removing all other PDF from the 2007 categories and only adding these two PDFs in the 2007 category to check if they are working.

    You can contact us through https://dearhive.com/contact-us/ for private messages.

    @deip Hm, there is something in the background.

    Now I updated the plugin from 1.7.5.1 to 1.7.6.1, and magic happened, category shortcode works for the 4 books. Ok, there is another (empty) category, so let’s test it.

    I have 4 books (with PDF source). Now 2 books (3, 4) in category A, and 2 books (1, 2) in category B. Category shortcode works with category A, but not works with category B, after category setting changed on 2 books.

    For testing purpose, I disabled all plugins (except DearFlip), and changed the theme to another, but nothing happened. After that, I disabled post revision feature (via wp_config) and deleted revisions (from wp_posts table), but nothing happend. Finally I changed category settings on all books, and now book 1, 3 are in category A, and 2, 4 are in category B. Category A shortcode still working, but category B shortcode not changed, shows one empty book cover.

    Is there a cache method in the background?

    • This reply was modified 3 years, 7 months ago by Anonymus.
    Thread Starter lauyen

    (@lauyen)

    @iamnocremile my plugin was already updated but I didn’t get any magic ??

    @lauyen, @deip Got it! Category slug must start with a letter.

    Plugin Author deip

    (@deip)

    @iamnocremile That’s is a great find. We will look into it further and see if this is our plugin limitation or WordPress limitation. If yo have any researched material that you had been to, please share them – it would be of great help.

    Have a good day,
    Deip

    @deip In inc/shortcode.php this part is the key:

    if ( $ismulti ) {
      $limit = isset( $attr['limit'] ) ? (int) $attr['limit'] : 5;
      $ids   = array();
      $books = explode( ',', $atts['books'] );
      foreach ( (array) $books as $query ) {
        $query = trim( $query );
        if ( is_numeric( $query ) ) {
          array_push( $ids, $query );
        } else {...}

    Because of is_numeric( $query ) condition, we can use books=”id” to show a single book, or books=”id1, id2, id3, …” to show some books. If category slug is a number, for example a year (what I used), the plugin interpret as book id.

    Suggested solution: for category shortcode change attribute books to category.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    There’s been a request to remove a link in this topic. I’m sorry, but that is only done in extreme cases.

    https://www.ads-software.com/support/forum-user-guide/faq/#will-you-delete-my-post-or-my-link-within-my-post

    Search engine hits are never considered extreme. The post will not be edited or deleted.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Category shortcode not showing pdf’s’ is closed to new replies.