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 id="content"> | |
<h1>Ice Creams</h1> | |
<?php | |
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
$args = array( | |
'posts_per_page' => 5, |
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 to display only upcoming events for Sugar Events Calendar on the main Events archive. | |
function sc_filter_events( $query ) { | |
if( is_post_type_archive('sc_event') && (!is_admin()) && ($query->is_main_query()) ) { | |
$meta = array( | |
array( | |
'key' => 'sc_event_date_time', | |
'value' => time(), |
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 get_header(); ?> | |
<div class="wrapper"> | |
<div class="full"> | |
<?php hm_the_messages( 'lost-password' ) ?> | |
<?php if ($_GET["message"] == 'success') { ?> | |
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 register_my_page() { | |
global $my_page; | |
$my_page = add_menu_page( 'My Page', 'My Page', 'edit_pages', 'my_page.php', 'my_page_hook', 'dashicons-groups', 4 ); | |
} | |
add_action('admin_menu', 'register_my_page'); | |
function highlight_different_menu($parent_file){ |
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 s17_redirect_single_posts() { | |
if (is_single() { | |
wp_redirect( home_url( '/news/' ), 301 ) | |
exit; | |
} | |
} |
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 woocommerce_free_delivery_fragment( $fragments ) { | |
global $woocommerce; | |
ob_start(); ?> | |
<div class="promo">Show Promo Area</div> | |
<?php |
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_image_size( 'front-page-blog', 500, 500 ); ?> |
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_image_size( 'blog-image-cropped', 800, 600, true ); ?> |
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 stomp_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'stomp_mime_types'); |
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
How do you add fragments on initial load, such as menus? | |
How do you use forms to update posts / users? | |
How do you do authentication so only logged in users can update posts / users |
OlderNewer