Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #302736

    Hello, is there a way of setting image and video url’s in the media elements of enfold, dynamically.

    I want to pull demonstration links to videos & images that have been made for prospects who identify them self with a code that is used to query a database and extract the links.

    I don’t understand where the elements are stored and rendered and how to intercept them.

    If all else is impossible can I use ‘save as’ of a page to get the source code and put the relevant part into a code block and just use search/replace… I imagine that has a few problems though.


    • This topic was modified 3 years, 3 months ago by  twdlewis.

    Hey twdlewis!

    It depends on what element you are adding the data to and how the whole thing should/would potentially work.

    Its unfortunately the kind of question that is far to open ended for a concrete answer.


    This reply has been marked as private.

    It would need to be a custom built WordPress page template. I’ve done something like that for a client and its not overly difficult but it is beyond what we can do for you via support.

    If you have a bit of php experience the WordPress codex can walk you through creating the new page template and then its a few hours of time to code it together (depending on what kind of video player is needed).

    This reply has been marked as private.

    No it wouldn’t. The video element in the builder would need to be modified to run do_shortcode and ignore the incorrect url.

    This reply has been marked as private.

    A page template would be:

    It would be select-able from the page template dropdown and would output your element either before or after the visual editor content. So when I did that for a client I made a page template called video player and wrote some php to grab the data from the url, save it as variables and then added the variables into the video player on the page.

    I *think* that would be the easiest here but it depends on what your overall layout would be and how much other content should be edited on the page.

    To replace a ALB drag and drop element or add your own see:

    I have a function in the (Purchase code hidden if logged out)(Purchase code hidden if logged out) -theme/”>functions.php file that points to the child themes shortcode folder where I’ve replaced the default magazine element with a modified version. That way it shows the last updated data instead of the published date

    You could do the same thing but create a new element.

    This reply has been marked as private.
Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘How set image and video dynamically using php’ is closed to new replies.