-
AuthorPosts
-
October 10, 2018 at 6:17 pm #1020030
Avia Layout Builder is based on shortcodes. These are stored to the database. I tried to replace specific image elements, but the change doesn’t seem to take effect.
For example, I activated the Debug Mode of ALB. After that, I looked for the shortcode of said element. To replace it, I’m running this MySQL statement:UPDATE wp_posts SET post_content = replace(post_content, "[av_image src='http://localhost/wp-content/uploads/2018/02/application_banner-e1537270610390.png' attachment='521' attachment_size='full' align='center' styling='' hover='' link='manually,https://www.f6s.com/spinlab-thehhlaccelerator8thclass' target='_blank' caption='' font_size='' appearance='' overlay_opacity='0.4' overlay_color='#000000' overlay_text_color='#ffffff' copyright='' animation='no-animation' av_uid='av-9ts9qf' admin_preview_bg=''][/av_image]", "[av_image src='http://localhost/wp-content/uploads/2018/09/APPLY_NOW_FEATURED.png' attachment='521' attachment_size='full' align='center' styling='' hover='' link='manually,https://www.nein.com' target='_blank' caption='' font_size='' appearance='' overlay_opacity='0.4' overlay_color='#000000' overlay_text_color='#ffffff' copyright='' animation='no-animation' av_uid='av-9ts9qf' admin_preview_bg=''][/av_image]");
The only thing I change is the URL of the image. The MySQL statement takes changes the affected rows, but the website still looks the same. When I look at the page with the ALB Debug Mode again, it still shows the old shortcode element in place.
Is it not possible to do something like this?- This topic was modified 6 years, 2 months ago by rockyrockshow.
October 11, 2018 at 10:45 pm #1020510Hey rockyrockshow,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
BasilisAugust 21, 2019 at 6:53 pm #1129696I had the same issue and no time to use a freelancer. It doesn’t require customisation of the theme.
For anyone looking for this in future, you can change the ALB content by replacing on the _aviaLayoutBuilderCleanData meta_key in the postmeta table, instead or as well as post_content in the posts table.
So instead of (or as well as):
UPDATE wp_posts SET post_content = REPLACE (post_content, 'oldstring', 'newstring')
You can use:
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'oldstring', 'newstring') WHERE meta_key = '_aviaLayoutBuilderCleanData'
PS You’re directly editing values in the database so take a back up and take care.
- This reply was modified 5 years, 4 months ago by JoeLovell.
August 21, 2019 at 9:37 pm #1129770Hi JoeLovell,
Thanks for sharing :)
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.