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
function fq_remove_yoast_columns( $columns ) { | |
// remove the Yoast SEO columns | |
unset( $columns['wpseo-score'] ); | |
unset( $columns['wpseo-title'] ); | |
unset( $columns['wpseo-metadesc'] ); | |
unset( $columns['wpseo-focuskw'] ); | |
unset( $columns['wpseo-score-readability'] ); | |
return $columns; | |
} |
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
// Handy function to get next/prev post of any post type, based on any ordering criteria | |
function fq_get_nearest_posts( $post_type=null, $orderby='menu_order', $order='ASC' ) { | |
$args = array( | |
'post_type' => $post_type ? $post_type : get_post_type(), | |
'orderby' => $orderby, | |
'order' => $order, | |
'posts_per_page' => -1, | |
); |
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
/* | |
* FQ website credit line | |
* | |
* Template tag that echoes html for a website credit line for FQ; | |
* includes option to have a small logo appear in either black or white. | |
* | |
* @param (string) $text Optional. Text you want displayed before link and FQ name. Defaults to "Website by". | |
* @param (string) $logo Optional. Whether to display a version of our logo. Accepted values are 'black', 'white, or false. Defaults to false. | |
* | |
* Example: the_fq_credit( 'Website developed by', 'white' ); |
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
/* | |
* Keep WordPress native custom-post-type archive view, while redirecting any single views back to the archive. | |
* To use when single views are not wanted or needed. | |
* Takes no parameters. | |
*/ | |
add_action( 'template_redirect', 'fq_disable_single_cpt_views' ); | |
function fq_disable_single_cpt_views() { |
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
/* | |
* WORDPRESS | |
* Template tag that echoes a notice that there is an SSL connection on the current page. Returns false if not. | |
* | |
* @param (string) $text Optional. The text to be displayed if there is an SSL connection. | |
* @param (bool) $icon Optional. If true, echos a span for a lock icon. | |
*/ | |
function the_secure_connection( $icon=true, $text='Secure connection' ) { |
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
/* | |
==== Wrap video embeds in a div so they can be made responsive | |
(will need to have appropriate css in place) | |
.embed-container iframe {position:absolute;top:0;left:0;width:100%;height:100%} | |
*/ | |
add_filter( 'embed_oembed_html', 'fq_wrap_embed', 10, 3 ); |
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
/*-------------------------------------------------------------- | |
# Google Analytics script (gets called into head element) | |
--------------------------------------------------------------*/ | |
function fq_google_analytics() { | |
$google_ua_code = 'xxxxxxxxxxxxx'; // Add "UA" code for this site from Google | |
echo "<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
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="page-content"> | |
<?php | |
// Specify the taxonomy and post type for the queries. | |
$fq_post_type = 'xxxxpost_typexxxxx'; | |
$fq_taxonomy = 'xxxtaxonomyxxx'; | |
$term_args = array( | |
'orderby' => 'title', |
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
/* | |
* Dynamic copyright date | |
* | |
* Template tag that echoes html for a copyright string to the page; | |
* includes option to have a "starting year" as well as the current year. | |
* | |
* @param (string) $organization Optional. Name of the company or organization that holds the copyright to site content. Defaults to site title. | |
* @param (string) $launch_year Optional. The year the site was launched. | |
* | |
* Example: the_copyright_statement( 'Figoli Quinn & Associates', '2014' ); |