Viewing 2 reply threads
  • Author
    Posts
    • #1726
      achowell
      Member

      When I create settings that contain an uploaded image and I use the get_option function in my homepage will this return the file path when used with piklist?

      So if I have an upload field called ‘upload_mp4’ I can add it to this code here –

      $theme_options = get_option('my_theme_settings');
      
      $mp4_field = $theme_options['upload_mp4'];
      
      echo '<source src=" . $mp4_field . " type="video/mp4">';

      And $mp4_field would display the path of the upload?

    • #1737
      achowell
      Member

      Oh never mind, I just experimented with the results and found out that this gives me the post id. I just took that and placed it in the url obtaining function from wordpress – wp_get_attachment_url() and put that in a variable to use in an echo.

      I did find out if you have several media uploads on one page, that there is a bug that will cause them to be un-removable or attach in the wrong fields with the only way to fix things being to reload the page. Any idea when this bug will be fixed or if its an easy fix?

    • #1738
      Steve
      Keymaster

      @achowellHere’s an article about pulling upload data from WordPress/Piklist. Multiple uploads is not as easy as it seems.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.