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
add_action( 'wp','generate_move_featured_image' ); | |
function generate_move_featured_image() | |
{ | |
remove_action('generate_after_header','generate_featured_page_header', 10); | |
add_action('generate_after_header','generate_featured_page_header', 4); | |
} |
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
if ( ! function_exists( 'generate_archive_title' ) ) : | |
/** | |
* Build the archive title | |
* | |
* @since 1.3.24 | |
*/ | |
add_action( 'generate_archive_title','generate_archive_title' ); | |
function generate_archive_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
/** | |
* Forever eliminate "Woocommerce" from the planet (or at least the little bit we can influence). | |
* | |
* Violating our coding standards for a good function name. | |
* | |
* @since 2.7.0 | |
* | |
* @staticvar string|false $dblq | |
* | |
* @param string $text The text to be modified. |
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
add_action( 'wp_enqueue_scripts', 'generate_replace_mobile', 100 ); | |
function generate_replace_mobile() { | |
wp_dequeue_style( 'generate-mobile-style' ); | |
wp_enqueue_style( 'custom-mobile-style', get_stylesheet_directory_uri() . '/css/mobile.css', false, GENERATE_VERSION, 'all' ); | |
} |
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
add_shortcode( 'mycred_manual_adjustments', 'mycred_render_manual_adjustments' ); | |
function mycred_render_manual_adjustments( $atts, $content = NULL ) { | |
// Must be logged in | |
if ( ! is_user_logged_in() ) return; | |
// myCRED must be enabled | |
if ( ! function_exists( 'mycred' ) ) return 'myCRED is not installed'; | |
// Load myCRED | |
$mycred = mycred(); |
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
@media (max-width: 768px) { | |
.main-navigation .menu-toggle, | |
.main-navigation .mobile-bar-items, | |
.sidebar-nav-mobile:not(#sticky-placeholder) { | |
display: block; | |
} | |
.main-navigation ul, | |
.gen-sidebar-nav { | |
display: none; |
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
add_filter( 'generate_back_to_top_output', 'tu_custom_back_to_top_icon' ); | |
function tu_custom_back_to_top_icon() { | |
printf( | |
'<a title="%1$s" rel="nofollow" href="#" class="generate-back-to-top" style="opacity:0;visibility:hidden;" data-scroll-speed="%2$s" data-start-scroll="%3$s"> | |
<img src="URL TO YOUR IMAGE" alt="Back to top" /> | |
<span class="screen-reader-text">%5$s</span> | |
</a>', | |
esc_attr__( 'Scroll back to top','generatepress' ), | |
absint( apply_filters( 'generate_back_to_top_scroll_speed', 400 ) ), | |
absint( apply_filters( 'generate_back_to_top_start_scroll', 300 ) ), |
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 generate_remove_post_image_padding() | |
{ | |
if ( function_exists( 'generate_spacing_get_defaults' ) ) : | |
$spacing_settings = wp_parse_args( | |
get_option( 'generate_spacing_settings', array() ), | |
generate_spacing_get_defaults() | |
); | |
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 if (($wp_query->current_post +1) == ($wp_query->post_count)) { | |
echo 'This is the last post'; | |
} ?> | |
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) { | |
echo 'This is the not the last post'; | |
} ?> |
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 | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
OlderNewer