This file contains 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
<div class="wrap"> | |
<div class="content-sidebar-wrap"> | |
<main class="content facetwp-template" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog"> | |
<div class="archive-description cpt-archive-description"> | |
<h1 class="archive-title">Resource Library</h1> | |
</div> | |
<article class="post-398 hai_resources type-hai_resources status-publish has-post-thumbnail entry" itemscope="itemscope" itemtype="http://schema.org/CreativeWork"> | |
<a href="http://localhost/hai/resources/resource-1/" title="Resource #1"><img width="150" height="182" src="http://localhost/hai/wp-content/uploads/2014/10/Unknown1-150x182.jpeg" class="alignright post-image entry-image" alt="Unknown" itemprop="image" /></a> | |
<header class="entry-header"> | |
<h1 class="entry-title" itemprop="headline"><a href="http://localhost/hai/resources/resource-1/" rel="bookmark">Resource #1</a></h1> |
This file contains 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_filter( 'facetwp_pre_filtered_post_ids', 'my_facetwp_pre_filtered_post_ids', 10, 2 ); | |
function my_facetwp_pre_filtered_post_ids( $post_ids, $class ) { | |
var_dump($post_ids,$class,'hello world'); | |
} | |
add_filter( 'facetwp_facet_html', 'my_facetwp_facet_html', 10, 2 ); | |
function my_facetwp_facet_html( $output, $params ) { | |
var_dump($output,$params); | |
} |
This file contains 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 | |
/* For query modification */ | |
add_action( 'pre_get_posts', 'hai_resources_pre_get_posts' ); | |
function hai_resources_pre_get_posts( $query ) { | |
// stop immediately if we're in the admin or not working with the main query | |
if( ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) || !$query->is_main_query() ) { | |
return; | |
} |
This file contains 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
{"facets":[{"label":"Categories","name":"categories","type":"checkboxes","source":"tax\/category","parent_term":"","orderby":"count","operator":"and","hierarchical":"no","ghosts":"no","preserve_ghosts":"no","count":"10"},{"label":"Countries","name":"countries","type":"checkboxes","source":"tax\/hai_countries","parent_term":"","orderby":"display_value","operator":"or","hierarchical":"no","ghosts":"yes","preserve_ghosts":"yes","count":"100"},{"label":"Topic Areas","name":"topic_areas","type":"checkboxes","source":"tax\/hai_topics","parent_term":"","orderby":"display_value","operator":"or","hierarchical":"no","ghosts":"yes","preserve_ghosts":"yes","count":"100"},{"label":"Library Search","name":"library_search","type":"search","search_engine":"library_search","placeholder":""}]} |
This file contains 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
<strong>Bold</strong> | |
<em>Italic</em> | |
<h2>Heading</h2> | |
<a href="#">Link</a> | |
<span style="text-decoration: underline;">Underline</span> |
This file contains 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
/** | |
* changes read more link from "Read More..." to "Read More!" | |
* | |
* @param string $ellipsis punctionation at end of read more link | |
* | |
* @return string new punctuation | |
*/ | |
add_filter( 'fpw_read_more_ellipsis', 'fpw_change_read_more_ellipsis_to_exclamation' ); | |
function fpw_change_read_more_ellipsis_to_exclamation() { | |
return '!'; |
This file contains 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 {prefix}_post_class( $classes ) { | |
if( is_archive() && is_sticky() ) { | |
$classes[] = 'sticky'; | |
} | |
return $classes; | |
} | |
add_filter( 'post_class', '{prefix}_post_class' ); |
This file contains 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_filter( 'get_the_archive_title', '{prefix}_cat_title' ); | |
/** | |
* Remove "Category: " prefix from Category archive pages | |
*/ | |
function {prefix}_cat_title( $title ) { | |
if( is_category() ) { | |
$title = single_cat_title( '', false ); | |
} |