This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Replies

1
  1. Alex S Staff 5 years, 5 months ago

    Hi Amine,

    This is possible, but it’s quite a complicated process to achieve. We’re unfortunately only able to provide a limited outline due to the complexity of this task. If you’re not very familiar with PHP, I recommend hiring a developer to assist you with this. We recommend using Codeable.

    To do this you’ll need to:

    Get the post content of the page you wish to update programmatically.
    Parse and filter the blocks added to the content until you find the SiteOrigin Layout block.
    Process the raw layout of the block and then iterate that layout until you find your widget.
    Make your desired changes, and then save the layout (here’s an example of how to do this).
    For SEO reasons, you should update the SO Layout Attribute.

    Kind regards,
    Alex

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread