• Hi,

    First of all, thanks for the plugin. A simple and beautiful plugin that does its job.
    There is no problem with normal post or page types. But it does not work if we use custom post type. As far as I can see, the problem is in this control.

    if (is_page() || is_single()) {
    global $post;
    if ($post) {
    // Cerca lo shortcode nel contenuto del post
    preg_match('/\[fptf-flipbook pdf="([^"]+)"/', $post->post_content, $matches);
    if (!empty($matches[1])) {
    $pdf_url = esc_url($matches[1]);
    }
    }
    }
    if (!empty($pdf_url)) {
    wp_enqueue_script('flipbook-js', plugins_url('js/fptf-flipbook.js', __FILE__), array('jquery', 'turn-js'), null, true);
    wp_localize_script('flipbook-js', 'fptfFlipbookData', array(
    'pdfUrl' => $pdf_url,
    'isAdminPage' => is_admin() ? 'true' : 'false',
    ));
    }

    I would be glad if you can change this in future updates.
    with friendship.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Custom Post Type’ is closed to new replies.