Body: <p>When trying to fix this issue <a href="https://civicrm.stackexchange.com/questions/33700/search-ajax-script-not-a-valid-javascript-mime-type">Search ajax script &quot;not a valid JavaScript MIME type&quot;</a> by attempting to bypass added editor plugins, I'm using the WordPress plugin Advanced Custom Fields to add another WYSIWYG editor. </p>
  
  <p>I'm using the standard <code>get_field</code> call with <code>do_shortcode</code> in the page template file:</p>
  
  <pre><code>&lt;?php
  if( get_field('civicrm_shortcode') ) {
  echo do_shortcode(get_field('civicrm_shortcode')); }
  ?&gt;
  </code></pre>
  
  <p>I can use a simple shortcode with no parameters in the WYSIWYG editor, i.e. <code>[a_simple_shortcode]</code> and it works; but using the CiviCRM shortcode with parameters, i.e. <code>[civicrm component="profile" gid="14" mode="create" hijack="0"]</code> shows nothing.</p>
  
  <p>Is this a ACF or CiviCRM issue? Is it possible to get ACF or CiviCRM to parse the CiviCRM shortcode? </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-14T11:29:14.517Z
Comments.Text: Works for me - the shortcode renders just fine. I have a field of type "text" attached to a field group which shows on WordPress pages. I added your code to a custom template for a page. With the demo data loaded into CiviCRM, I then added `[civicrm component="profile" gid="1" mode="create" hijack="0"]` to the field. The "Name and Address" profile rendered perfectly.
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-14T11:30:14.367Z
Comments.Text: What I'm saying is... I think we need more info about your setup...
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-14T11:44:05.023Z
Comments.Text: Ah, hold on... it renders fine, but the CiviCRM resources are not added to the page header... See this answer for the solution to that https://civicrm.stackexchange.com/a/16723/520
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-14T16:15:10.820Z
Comments.Text: Thanks, tried that, but now with CiviCRM loading, I get the same console errors as https://civicrm.stackexchange.com/questions/33700/search-ajax-script-not-a-valid-javascript-mime-type
Comments.UserDisplayName: BlueDogRanch
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-14T16:58:31.063Z
Comments.Text: Something must be a conflict in your setup. As I said, on a vanilla install (just CiviCRM and ACF) everything works as expected.
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-14T21:18:40.300Z
Comments.Text: Manually loading the script with `<script>` tags on the one page still throws the MIME error.
Comments.UserDisplayName: BlueDogRanch
Tags: <wordpress>
Title: Parsing search shortcodes by Advanced Custom Fields
ThreadText: # Parsing search shortcodes by Advanced Custom Fields
  
  (Asked by: username_0 on 2019-11-13)
  
  When trying to fix this issue [Search ajax script "not a valid JavaScript MIME type"](https://civicrm.stackexchange.com/questions/33700/search-ajax-script-not-a-valid-javascript-mime-type) by attempting to bypass added editor plugins, I'm using the WordPress plugin Advanced Custom Fields to add another WYSIWYG editor.
  
  I'm using the standard `get_field` call with `do_shortcode` in the page template file:
  
  ```
  <?php
  if( get_field('civicrm_shortcode') ) {
  echo do_shortcode(get_field('civicrm_shortcode')); }
  ?>
  
  ```
  
  I can use a simple shortcode with no parameters in the WYSIWYG editor, i.e. `[a_simple_shortcode]` and it works; but using the CiviCRM shortcode with parameters, i.e. `[civicrm component="profile" gid="14" mode="create" hijack="0"]` shows nothing.
  
  Is this a ACF or CiviCRM issue? Is it possible to get ACF or CiviCRM to parse the CiviCRM shortcode?
  
  **Tags:** wordpress
  
  > **Comments:**
  > **username_1**: Works for me - the shortcode renders just fine. I have a field of type "text" attached to a field group which shows on WordPress pages. I added your code to a custom template for a page. With the demo data loaded into CiviCRM, I then added `[civicrm component="profile" gid="1" mode="create" hijack="0"]` to the field. The "Name and Address" profile rendered perfectly.  
  > **username_1**: What I'm saying is... I think we need more info about your setup...  
  > **username_1**: Ah, hold on... it renders fine, but the CiviCRM resources are not added to the page header... See this answer for the solution to that https://civicrm.stackexchange.com/a/16723/520  
  > **username_0**: Thanks, tried that, but now with CiviCRM loading, I get the same console errors as https://civicrm.stackexchange.com/questions/33700/search-ajax-script-not-a-valid-javascript-mime-type  
  > **username_1**: Something must be a conflict in your setup. As I said, on a vanilla install (just CiviCRM and ACF) everything works as expected.  
  > **username_0**: Manually loading the script with `<script>` tags on the one page still throws the MIME error.  
  
  ---
  
  ## 0 answers
  
  