• Resolved jacksterlin

    (@jacksterlin)


    Hello!
    I’m trying to add bookmarks to favorite ads using the “Favorites” plugin, but I’m running into a problem. When editing an ad template in a draft, I insert a shortcode for the “Like” button, which will bookmark it, but it does not work in an already published ad (it just shows the text of the shortcode).
    https://ibb.co/MZttdb0
    Although when previewing a draft, the button is shown. I tried it on other types of content (posts, pages) – the shortcode works there.

    Can you tell me please what this might be connected with?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,

    this is because the details page when rendered in the frontend does not allow shortcodes for security reasons, it would be best if the “Favorite” button would be a block.

    In the next update that should be available this month i will see if there is a safe way to allow the shortcodes in the templates.

    In the meantime if you really need this you can open the wpadverts/includes/functions.php file, find line (about 434)

    $content = do_blocks( $block_templates->get_post_template( $post_type ) );

    and below it add

    $content = do_shortcode( $content );
    Thread Starter jacksterlin

    (@jacksterlin)

    Thanks a lot! This works great!

    Thank you very much for your help! This works great! This topic can be closed.

    • This reply was modified 7 months, 3 weeks ago by jacksterlin.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display bookmark shortcode for ad’ is closed to new replies.