Skip to content

Commit

Permalink
Merge branch 'release/0.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrossi committed Jan 19, 2017
2 parents 580e085 + 8573bb2 commit 8c0b89c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Field/BasicField.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public function fetchFieldKey($fieldName)
*/
public function fetchFieldType($fieldKey)
{
$post = $this->post->where('post_name', $fieldKey)->first();
$post = $this->post->orWhere(function ($query) use ($fieldKey) {
$query->where('post_name', $fieldKey);
$query->where('post_type', 'acf-field');
})->first();

if ($post) {
$fieldData = unserialize($post->post_content);
Expand Down

0 comments on commit 8c0b89c

Please sign in to comment.