Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Roman Bauer

    (@roba87)

    I think i fixed the shortcode bug. Please update the plugin to version 1.1.1 and check if the error is still coming.

    Greetings

    Plugin Author Roman Bauer

    (@roba87)

    I think I could reproduce the error. I’ll will fix it next week and make a new release.

    The error occurs in connection with the supported_post_type hook. For example, if you do that:

    add_filter( ‘smfi_supported_post_types’, ‘change_smfi_supported_post_types’ );
    function change_smfi_supported_post_types( $current_supported_post_types) {
    $my_supported_types = array(‘post’);
    return $my_supported_types ;
    }

    As a result, the featured images should only be displayed within a post. Page and other custom post types should not display the featured images. If you now open a page or custom post type they will display the error message described above. The error message is displayed because it loads a script, which should not be loaded.

    Plugin Author Roman Bauer

    (@roba87)

    I’ll look at the next week again and get back to you.

    Plugin Author Roman Bauer

    (@roba87)

    I added the hook smfi_img_limit. It allows you limit the number of images.
    Just look at the documentation for this: https://www.roman-bauer-web.de/wordpress-plugin-smfi.

    Your error message (“Failed to initialize plugin: “smfiShortcodesButtonsPlugin”) is definitely a bug. I think the problem is somewhere in Javascript. Something goes wrong in the main script. This causes the other scripts to fail. In your example, it’s the script that provides the shortcode functionality.

    I can not reproduce the error. I would have to know exactly what I have to do for it. Then I could find the bug and fix it.

    Plugin Author Roman Bauer

    (@roba87)

    I can not reproduce the error. I have created a custom post type and activated the Classic Editor via plugin. The featured images are displayed correctly. WordPress is on version 5.2.4.

    What exactly do I have to do to provoke the error? Which WordPress version and configuration do you use? Where did you see the error?

    Is it possible to disable post type: “post” i need it only for pages?

    Yes, you can use the filter smfi_supported_post_types. Use the filter and return a new array with the element “page”.

    Its a good idea to display metabox by default on side instead of on main column.

    The plugin is designed to handle larger amounts of images. Therefore, the images are displayed by default in the main column. For a smaller amount of images maybe the plugin Dynamic Feauted Image is more suitable. It is shown by default in the side column.

    Maybe I’ll change it later if there are more requests.

    Its a good idea to set maximum allowed images by filter, we need only one image, but admins may add more it good to be restricted.

    I’ll put that in the next version.

    • This reply was modified 6 years, 7 months ago by Roman Bauer.
    • This reply was modified 6 years, 7 months ago by Roman Bauer.
    Plugin Author Roman Bauer

    (@roba87)

    Hi,

    I will look at the problem next week and give feedback to the problem and your questions. Greeting

    • This reply was modified 6 years, 7 months ago by Roman Bauer.
    Plugin Author Roman Bauer

    (@roba87)

    Hi,

    i have not worked with WooCommerce so far. What exactly do you want to do? Are you a developer?

    Plugin Author Roman Bauer

    (@roba87)

    I have not dealt much with the WordPress REST API so far!

    The IDs of the images you add to a post are saved as metadata for that post. The meta key used for this is “_smfi”. For each image added, an entry with the meta key “_smfi” is created. Each entry with this meta key has as value an associative array with the array key “img_id”.

    You could certainly use the WordPress REST API to query the metadata and find out the corresponding IDs of the multiple featured images. Then you could use the IDs to query the image information from WordPress (such as the URL).

    The plugin currently does not offers simplified interactions with the WordPress REST API. If there is enough demand, I would implement it.

    • This reply was modified 7 years, 1 month ago by Roman Bauer.
    • This reply was modified 7 years, 1 month ago by Roman Bauer.
    • This reply was modified 7 years, 1 month ago by Roman Bauer.
    • This reply was modified 7 years, 1 month ago by Roman Bauer.
    Plugin Author Roman Bauer

    (@roba87)

    Hi,

    which version of PHP do you use?
    As you can see in the description, the plugin is designed for PHP version 7 or higher. Try to increase the PHP version on your server.

    Otherwise, I need more information about how the error arises. What exactly did you do to make the error appear?

    greeting

Viewing 9 replies - 1 through 9 (of 9 total)