This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_searchwp_omit_meta_key( $omit, $meta_key, $the_post ) { | |
$url_meta = 'link-url'; | |
$url_found = strpos( $meta_key, $url_meta ); | |
// if "link-url" is in a custom field meta key name, do not index it | |
if ( false !== $url_found ) { | |
$omit = true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// retrieve search variables from url | |
foreach ( $_GET as $key => $value ) { | |
$$key = sanitize_text_field( $value ); | |
} | |
// retrieve our search query if applicable | |
$query = isset( $_REQUEST['swpquery'] ) ? sanitize_text_field( $_REQUEST['swpquery'] ) : ''; | |
// retrieve our pagination if applicable | |
$swppg = isset( $_REQUEST['swppg'] ) ? absint( $_REQUEST['swppg'] ) : 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
/* Template Name: SearchWP State Search Results */ | |
global $post; | |
//get the query | |
$query = isset( $_REQUEST['t'] ) ? sanitize_text_field( $_REQUEST['t'] ) : ''; | |
$stateId = isset($_REQUEST['stateId']) ? sanitize_text_field( $_REQUEST['stateId'] ) : ''; | |
if($stateId == '*') { | |
$stateId = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* SimpleTruth2.0 functions and definitions. | |
* | |
* This file will be cleaned up before live as there are various unneeded calls. | |
* | |
* @link https://developer.wordpress.org/themes/basics/theme-functions/ | |
* | |
* @package SimpleTruth2.0 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying search results pages. | |
* | |
* @package _s | |
*/ | |
get_header(); ?> | |
<div id="primary" class="contents-search-results"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add to your theme's functions.php | |
add_filter( 'searchwp_indexed_post_types', 'my_searchwp_indexed_post_types' ); | |
add_filter( 'searchwp_engine_settings_default', 'my_searchwp_engine_settings_default', 10, 2 ); | |
function my_searchwp_indexed_post_types( $post_types ) { | |
if ( ! in_array( 'attachment', $post_types ) ) { | |
$post_types[] = 'attachment'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2015-20-05 6:30:11][notice][555cc4a378e56] | |
[2015-20-05 6:30:11][notice][555cc4a378e56] ========== INIT 555cc4a378e56 2.5.4 ========== | |
[2015-20-05 6:30:11][notice][555cc4a378e56] | |
[2015-20-05 6:30:11][notice][555cc4a378e56] checkForMainQuery(): It is the main query | |
[2015-20-05 6:30:11][notice][555cc4a378e56] | |
[2015-20-05 6:30:11][notice][555cc4a378e56] ========== END 555cc4a378e56 ========== | |
[2015-20-05 6:30:11][notice][555cc4a378e56] | |
[2015-20-05 6:30:12][notice][555cc4a482e1d] | |
[2015-20-05 6:30:12][notice][555cc4a482e1d] ========== INIT 555cc4a482e1d 2.5.4 ========== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template used for generating blog template Format 1 List | |
* | |
* @package WordPress | |
* @subpackage ASI Themes | |
* @since IOA Framework V1 | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Template Name: SearchWP Supplemental Search Engine Postcode Search */ | |
global $post; | |
// retrieve our search query if applicable | |
$query = isset( $_REQUEST['postcode'] ) ? sanitize_text_field( $_REQUEST['postcode'] ) : ''; | |
// if there was a space in the search, grab the first part |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_searchwp_extra_metadata( $extra_meta, $post_being_indexed ) { | |
// index the author country | |
$author_country = get_field('my_countries', $post_being_indexed->post_author ); | |
// it's stored as an array so let's get the actual text | |
$author_country = is_array( $author_country ) && count( $author_country ) ? implode( ' ', $author_country ) : ''; | |
if ( ! empty ( $author_country ) ) { | |
$extra_meta['my_author_meta_country'] = $author_country; |