Skip to content

Instantly share code, notes, and snippets.

@colewinans
Created June 27, 2013 15:01
Show Gist options
  • Save colewinans/5877166 to your computer and use it in GitHub Desktop.
Save colewinans/5877166 to your computer and use it in GitHub Desktop.
Swiftype boosting
switch($post->post_type):
case "glossary":
$type_value = 1;
break;
case "page":
$type_value = 2;
break;
case "book_section":
$type_value = 3;
break;
case "book_example":
$type_value = 4;
break;
case "product":
$type_value = 5;
break;
case "post":
$type_value = 6;
break;
default:
$type_value = 7;
endswitch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment