• I have a LearnPress course with a featured image. I deselected the option to hide the featured image for that course. But the featured image is still being hidden by the plugin and it looks terrible. If I deactivate this plugin, then the featured image is displayed normally.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author cyrillbolliger

    (@cyrillbolliger)

    Hi @brianjstarr

    Thanks for reaching out. I’ve just made a few tests with LearnPress but could not reproduce the issue. In my setup it worked as expected:
    – Checkbox checked: In single course view LearnPress’ placeholder image is visible instead of featured image
    – Checkbox unchecked: In single course view the featured image is visible
    – In the course list, the featured image is always visible

    Could you please provide me the following information, so I can investigate your issue?

    – Version of WordPress
    – Theme name and version
    – Plugins (all activated ones, incl. their versions)

    The test setup I used:
    – WordPress 5.9.3 (clean install without config changes)
    – Theme Twenty Twenty-One 1.5
    – LearnPress 4.1.6.4 (clean install with sample data, no config changes)
    – Conditionally display featured image on singular pages and posts 2.12.0
    – No other plugins

    Thread Starter brianjstarr

    (@brianjstarr)

    Theme: Latest Storefront
    I also have the SEO from Monster Analytics which might be relaxant.

    I will try to get the other info later.

    However, ideally you should provide a hook to block loading of your plugin depending on the post_type. I directly modified your PHP to check the post_type in the code that runs when a page loads, and return if the post type is lp_course, and everything works perfectly.

    I checked the page meta for your plugin (I forget the name of the meta key) in MySQL and it was indeed “No”, but the featured image wasn’t being loaded regardless. I even deleted the row with the meta key, and it didn’t help. Maybe it is being cached someplace: I tried purging the cache and it didn’t help.

    FYI, having to modify functions.php is not a good solution. But, even if I modify functions.php, it doesn’t fully block the plugin code from running for those post_type’s. You need to add that ability, too.

    Thread Starter brianjstarr

    (@brianjstarr)

    As for the rating, even if this specific issue was fixed, I still have to down rate your plugin because vital options are only adjustable by making changes to functions.php. This is really only suitable for advanced users. A proper GUI should be provided.

    Plugin Author cyrillbolliger

    (@cyrillbolliger)

    Hi @brianjstarr

    Thanks for your response.

    I’ve updated the plugin so the cybocfi_enabled_for_post_type filter also hits the frontend, as you’ve suggested. It will be downloadable shortly.

    However, also when trying with the latest Storefront theme (default settings), I can’t reproduce the issue you described.

    The plugin aims to be a ‘just works’ solution for 80% of the users, without any settings. The remaining 20% with special needs will have to use the provided filters. That’s a design decision I won’t going to change.

    Have an excellent day,
    Cyrill

    Thread Starter brianjstarr

    (@brianjstarr)

    Perhaps you could let users specify the excluded post types in a MySQL table. That is a safer option than making them modify their functions.php

    Thread Starter brianjstarr

    (@brianjstarr)

    Anyway, I assume this update will fix my problem, so I’m not worried about incompatibility.

    FYI, nobody would realistically want to hide the featured picture of their course on the course page, as LearnPress will then put a placeholder “missing photo” picture there if you hide it, which looks ugly. If you’ve tested this, you must have also noticed that, right? There are probably a lot of post types that just don’t make any sense to use with your plugin, so rather than give people to figure out how to exclude them by messing with their functions.php, I’d say just exclude those by default rather than the other way around.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Always hides featured image in LearnPress courses’ is closed to new replies.