This file contains hidden or 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 | |
$myvals = get_post_meta(get_the_ID()); | |
foreach($myvals as $key=>$val) | |
{ | |
echo $key . ' : ' . $val[0] . '<br/>'; | |
} | |
?> |
This file contains hidden or 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 | |
/** | |
* Register widget area. | |
* | |
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar | |
*/ | |
function strappress_widgets_init() { | |
register_sidebar( array( | |
'name' => esc_html__( 'Sidebar', 'strappress' ), | |
'id' => 'sidebar-1', |
This file contains hidden or 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
.sp-hero { | |
min-height: 500px; | |
background-position: center top; | |
background-size: cover; | |
width: 100%; | |
background-repeat: no-repeat; | |
position: relative; | |
h1 { | |
color: $white; |
This file contains hidden or 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_template_part( 'template-parts/home/hero', 'banner' ); ?> |
This file contains hidden or 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 | |
$hero_image = get_theme_mod( 'hero_image', '' ); | |
$hero_text = get_theme_mod( 'hero_text', '' ); | |
?> | |
<div class="sp-hero" style="background-image: url('<?php echo esc_url( $hero_image ); ?>')"> | |
<h1><?php echo $hero_text; ?></h1> | |
</div> |
This file contains hidden or 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 ( class_exists( 'Kirki' ) ) { | |
/** | |
* Add the theme configuration | |
*/ | |
Kirki::add_config( 'strappress_theme', array( | |
'option_type' => 'theme_mod', | |
'capability' => 'edit_theme_options', | |
) ); |
This file contains hidden or 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 | |
/** | |
* StrapPress Theme Customizer | |
* | |
* @package StrapPress | |
*/ | |
/** | |
* Add postMessage support for site title and description for the Theme Customizer. | |
* |
This file contains hidden or 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 | |
/** | |
* This file represents an example of the code that themes would use to register | |
* the required plugins. | |
* | |
* It is expected that theme authors would copy and paste this code into their | |
* functions.php file, and amend to suit. | |
* | |
* @see http://tgmpluginactivation.com/configuration/ for detailed documentation. | |
* |