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 | |
/** | |
* 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 | |
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 | |
// 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 | |
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 | |
/** | |
* Template Name: Newsroom | |
* | |
* @package becketfund | |
*/ | |
global $post; | |
// retrieve our search query if applicable . |
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 default template for displaying content | |
* | |
* Used for both single and index/archive/search | |
* | |
* @package Catch Themes | |
* @subpackage Clean Journal | |
* @since Clean Journal 0.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 | |
/** | |
* Template Name: search-events-nodates | |
* | |
* This is template will display a login form | |
*/ | |
add_action('get_header', 'ck_do_login_form'); | |
// Début de page pour supprimer les commentaires présents sur les pages par défault |
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 | |
if (!is_user_logged_in()) { | |
if (!in_array($GLOBALS['pagenow'], array('wp-login.php'))) { | |
if ( isset( $_REQUEST['swpnonce'] ) || isset( $_REQUEST['swppurge'] ) ) { | |
//Indexer | |
} else { | |
$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
if ( wp_redirect(wp_login_url($actual_link)) ) { | |
exit; |
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 | |
// Seach WP posts per page | |
add_filter('searchwp_posts_per_page', function($posts_per_page, $engine, $terms, $page) { | |
return 20; | |
}, 99, 4); |