Last active
July 14, 2019 06:40
-
-
Save rachelmccollin/1cdc2382b6d4fb70c9a847ab51774a2c to your computer and use it in GitHub Desktop.
WPMU DEV Write and activate a 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
echo apply_filters( 'wpmu_filter_hook', '<h3>Latest Posts</h3>' ); |
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
/************************************************************************ | |
wpmu_add_google_fonts - register google fonts | |
************************************************************************/ |
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
/***************************************************************************** | |
wpmu_posted_on - add dates on single posts | |
*****************************************************************************/ | |
function wpmu_posted_on() { | |
if ( is_singular( 'post' ) ) {?> | |
<section class="entry-meta"> | |
<?php echo get_the_date(); ?> | |
</section> | |
<?php } | |
} | |
add_action ( 'wpmu_before_content', 'wpmu_posted_on' ); |
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
/***************************************************************************** | |
wpmu_posted_on - add dates on single posts - THIS IS INCORRECT | |
*****************************************************************************/ | |
function wpmu_posted_on() { | |
<section class="entry-meta"> | |
<?php echo get_the_date(); ?> | |
</section> | |
} | |
if ( is_singular( 'post' ) ) { | |
add_action ( 'wpmu_before_content', 'wpmu_posted_on' ); | |
} |
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
/***************************************************************************** | |
wpmu_posted_on - add dates on single posts - THIS IS INCORRECT | |
*****************************************************************************/ | |
if ( is_singular( 'post' ) ) { | |
function wpmu_posted_on() { | |
<section class="entry-meta"> | |
<?php echo get_the_date(); ?> | |
</section> | |
} | |
} | |
add_action ( 'wpmu_before_content', 'wpmu_posted_on' ); |
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
do_action( 'wpmu_before_content' ); |
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
/***************************************************************************** | |
wpmu_heading - override title of latest posts section | |
*****************************************************************************/ | |
function wpmu_heading() { | |
<h3>Recent Posts</h3> | |
} | |
add_filter ( 'wpmu_filter_hook', 'wpmu_heading' ); |
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
wp_register_style( 'googleFonts', 'https://fonts.googleapis.com/css?family=Assistant|Oswald:300'); | |
wp_enqueue_style( 'googleFonts'); |
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 wpmu_add_google_fonts() { | |
} |
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', 'wpmu_add_google_fonts' ); |
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
/************************************************************************ | |
wpmu_add_google_fonts - register google fonts | |
************************************************************************/ | |
function wpmu_add_google_fonts { | |
wp_register_style( 'googleFonts', 'https://fonts.googleapis.com/css?family=Assistant|Oswald:300'); | |
wp_enqueue_style( 'googleFonts'); | |
} | |
add_action( 'wp_enqueue_scripts', 'wpmu_add_google_fonts' ); |
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
/************************************************************************ | |
wpmu_add_google_fonts - register google fonts | |
************************************************************************/ | |
function wpmu_add_google_fonts { | |
wp_register_style( 'googleFonts', 'https://fonts.googleapis.com/css?family=Assistant|Oswald:300'); | |
wp_enqueue_style( 'googleFonts'); | |
} |
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
/***************************************************************************** | |
wpmu_posted_on - add dates on single posts | |
*****************************************************************************/ | |
function rachelmcc_posted_on() { | |
<section class="entry-meta"> | |
<?php echo get_the_date(); ?> | |
</section> | |
} |
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
rachelmcc_posted_on(); |
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
/***************************************************************************** | |
wpmu_posted_on - add dates on single posts | |
*****************************************************************************/ | |
function rachelmcc_posted_on() { | |
<section class="entry-meta"> | |
<?php echo get_the_date(); ?> | |
</section> | |
} | |
add_action( 'wpmu_before_content', 'rachelmcc_posted_on' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment