Shortcode Issue

[ad_1]

I’ve been working with ACF and WP Bakery and created a shortcode \[guest\_image\] to display image. The image source when I add it to the destination, it breaks the website and the image is not displaying. On the other hand, when I simply output the shortcode value it displays the image source.

How to fix it.

[ad_2]
2 Comments
  1. I’m pretty sure you can’t have a shortcode as a shortcode attribute value. You’d be better off writing your own custom version of image_with_animation

  2. If this is possible, you could try the following steps, if anything helps:

    **1. Clear caching**

    -Clean your browser cache to make sure you are viewing the most up-to-date modifications-Clear any caching plugins (or services) you may have activated

    **2. Check the code of the shortcode [guest_image]**

    -Make sure that you have correctly defined the shortcode in the functions.php file of your theme or in a custom plugin

    -Make sure that the shortcode function is correctly implemented and returns the HTML output for the image

    **3. Verify the image source**

    -Inspect the source code generated by the [guest_image] shortcode to verify the image source

    -Ensure that the source URL is correct and pointing to a valid image file

    **4. Debug conflicting plugins/theme**

    -Deactivate any other plugins and switch to a default WordPress theme, like Twenty Twenty-One: [https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/])

    -Check if the [guest_image] shortcode works without any conflicts

    **5. Confirm compatibility with WP Bakery/ACF**

    -Make sure that both your ACF and WP Bakery plugins are up to date

    -Check if there are any known compatibility issues between WP Bakery and ACF

    -Try contacting the plugin developers for support or checking their documentation for any specific guidelines when using shortcodes

    **6. Test on a clean WP installation**

    -Set up a brand-new WordPress installation on either a local or staging server

    -Install only the required plugins (ACF, WP Bakery) and your theme

    -Test the [guest_image] shortcode, to see if the issue persists

    If the issue still persists after following these steps, consider reaching out to the plugin developers or hire a developer or agency:

    [https://www.wpbeginner.com/showcase/best-places-to-hire-wordpress-developers/])

    [https://www.isitwp.com/wordpress-maintenance-services/]) (FixRunner.com WP Agency is reliable and only charges once the task is completed)

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer