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 lcas_list_children( $atts, $content ) { | |
global $post; | |
ob_start(); | |
$args = array( | |
'post_parent' => $post->ID, | |
'post_type' => 'page', | |
'orderby' => 'title', | |
'order' => 'ASC', | |
); | |
$myquery = new WP_Query( $args ); |
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
<? | |
/* replace this part of the function theme_scripts in "Enqueue scripts and styles" */ | |
function theme_scripts() { | |
$themecsspath = get_stylesheet_directory() . '/style.css'; | |
wp_enqueue_style( 'theme-style', get_stylesheet_uri(), array(), filemtime( $themecsspath ) | |
); | |
/* change the excerpt's more.. to a linked text Read More... | |
* be sure to add a class for more-link | |
*/ |
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
# | |
# This does NOT work with PHP 7 | |
# | |
# as a result, I am now using a simple shell script with this one line: | |
# mysqlcheck -o -A -pmysql_root_password | |
# | |
#! /usr/bin/php | |
<?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
In the appropriate template file, replace | |
<?php _theme_content_nav( 'nav-below' ); ?> | |
with | |
<?php _sds_numeric_posts_nav( 'nav-below' ); ?> | |
The file may be index.php, archive.php or something else, depending on your theme |
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
#! /bin/sh | |
export DAY | |
declare DAY=`date|cut -c 1-3` | |
USER="root" | |
PASSWORD="password" | |
MYSQLDUMP="/usr/bin/mysqldump" | |
MYSQL="/usr/bin/mysql" | |
OUTPUTDIR="/home/sdstern/Backup/sugaree/sql" |
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 sds_post_title ( ) { | |
return get_the_title(); | |
} | |
add_shortcode( 'the_title', 'sds_post_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
function related_product_id_by_tax( $id, $tax ) { | |
$transient_name = 'related_' . $id . '_' . $tax; | |
$transient_time = 60 * 60 * 12; // 12 hours | |
if ( false === ( $transient_results = get_transient( $transient_name ) ) ) { | |
$tags_array = array(); | |
$tags = wp_get_post_terms( $id, $tax ); | |
foreach ( $tags as $tag ) { | |
$tags_array[] .= $tag->term_id; | |
} | |
$args = array( |
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:cover {"url":"http://tt.sterndata.com/wp-content/uploads/video/CBD-plant-slow-AVC-50FPS-PBR-4.mp4","id":55,"backgroundType":"video","align":"full"} --> | |
<div class="wp-block-cover alignfull has-background-dim"><video class="wp-block-cover__video-background" autoplay muted loop src="http://tt.sterndata.com/wp-content/uploads/video/CBD-plant-slow-AVC-50FPS-PBR-4.mp4"></video><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} --> | |
<p class="has-text-align-center has-large-font-size">Premium, organically grown hemp-based broad-spectrum CBD products with zero THC. A natural alternative to relieve pain, inflammation, and anxiety.<br>[shop-now]</p> | |
<!-- /wp:paragraph --></div></div> | |
<!-- /wp:cover --> | |
<!-- wp:columns --> | |
<div class="wp-block-columns"><!-- wp:column {"verticalAlignment":"bottom"} --> | |
<div class="wp-block-column is-vertically-aligned-bottom"><!-- wp:heading --> | |
<h2>Our Products</h2> |
OlderNewer