Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<?php use Roots\Sage\Titles; ?>
<div class="page-header page-header--no-cover">
<div class="container center" itemtype="">
<h1 class="page-title"><?= Titles\title(); ?></h1>
<meta property="url" content="<?php echo esc_url( home_url( '/help/documentation/' ) ) ?>"/>
<form role="search" method="post" class="search-form wedocs-search-form"
itemprop="potentialAction" itemscope itemtype=""
action="<?php echo esc_url( home_url( '/help/documentation/search/' ) ) ?>">
<meta itemprop="target" content="{query}/"/>
<div class="wedocs-search-input">
<input type="search" class="search-field"
placeholder="<?php _e( 'What can we help you with?', 'freemius' ) ?>"
value="<?php echo get_search_query() ?>"
title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>"/><button type="submit" tabindex="1"><span><?php _e( 'Search', 'freemius' ) ?></span></button>
<h2><?php _e('Search Freemius documentation using terms like "Deployment", "API", or "Payouts".') ?></h2>
<script type="text/javascript">
(function ($) {
$('.search-form.wedocs-search-form').on('submit', function () {
var search = $(this).find('input').val().toLowerCase().trim();
if ('' === search){
return false;
$(this).attr('action', $(this).attr('action') + encodeURIComponent(search) + '/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment