I’m trying to place my slider revolution shortcode in my home page php. The only option I have is to use do_shortcode but I can’t figure out how to fit it into the existing code. I believe the code would look like this
<!doctype html>
<title><?php wp_title(' • ', true, 'right'); ?></title>
<meta name="description" content="Door of Hope is a community in Portland, Oregon that is centered around Jesus and His Gospel.">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="icon" href="<?php echo get_template_directory_uri(); ?>/img/touch/favicon.png">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="196x196" href="<?php echo get_template_directory_uri(); ?>/img/touch/chrome-touch-icon-196x196.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Door of Hope">
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/img/touch/apple-touch-icon-precomposed.png">
<meta name="msapplication-TileImage" content="<?php echo get_template_directory_uri(); ?>/img/touch/ms-touch-icon-144x144-precomposed.png">
<meta name="msapplication-TileColor" content="#3372DF">
<?php wp_head(); ?>
<link href="https://fonts.googleapis.com/css?family=Karla:400,400i,700" rel="stylesheet">
<style>
<?php
if (get_field('header_background_image')) {
$backgroundImage = get_field('header_background_image');
$smallImage = $backgroundImage['sizes'][ 'header--small' ];
$mediumImage = $backgroundImage['sizes'][ 'header--medium' ];
$largeImage = $backgroundImage['sizes'][ 'header--large' ];
} else {
$smallImage = reset(wp_get_attachment_image_src(21, 'header--small'));
$mediumImage = reset(wp_get_attachment_image_src(21, 'header--medium'));
$largeImage = reset(wp_get_attachment_image_src(21, 'header--large'));
}
?>
.Header {
background-image: url("<?php echo $smallImage; ?>");
}
@media (min-width: 760px) {
.Header {
background-image: url("<?php echo $mediumImage; ?>");
}
}
@media (min-width: 1200px) {
.Header {
background-image: url("<?php echo $largeImage; ?>");
}
}
</style>
>
<div class="Row">
<div class="Span-12">
<div class="Header-navWrap">
<?php get_template_part( 'partials/nav', 'main' ); ?>
<div class="NavMobile-wrap">
<a href="#" class="NavMobile-hideShow" data-component="mobileNavBtn">
<span class="NavMobile-bar NavMobile-bar--1"></span>
<span class="NavMobile-bar NavMobile-bar--2"></span>
<span class="NavMobile-bar NavMobile-bar--3"></span>
</a>
<?php get_template_part( 'partials/nav', 'secondary' ); ?>
<div class="NavMobile-bg" data-ref="mobileNavBG"></div>
</div>
</div>
</div>
</div>
<?php
$headerContentType = get_field('header_content_type');
$hasTitle = get_field('header_title');
$hasHeadline = get_field('header_headline');
$hasIntroduction = get_field('header_introduction');
?>
<?php if ( $headerContentType === 'titleHeadline' && ($hasTitle || $hasHeadline) ) : ?>
<div class="Row">
<div class="Span-12">
<?php if ($hasTitle) : ?>
<h1 class="Header-subHead"><?php the_field('header_title'); ?></h1>
<?php endif; ?>
<?php if ($hasHeadline) : ?>
<h2 class="Header-headline"><?php the_field('header_headline'); ?></h2>
<?php else : ?>
<h2 class="Header-headline">Door of Hope</h2>
<?php endif; ?>
</div>
</div>
<?php elseif ( $headerContentType === 'introduction' && $hasIntroduction ) : ?>
<div class="Row Header-row--centered">
<div class="Span-12 Span-10-l Offset-1-l">
<?php if ($hasIntroduction) : ?>
<p class="Header-byline"><?php the_field('header_introduction'); ?></p>
<?php endif; ?>
</div>
</div>
<?php else : ?>
<?php
if (is_singular('soulsessions')) {
$subHead = get_field('soul_sessions_artist_name');
} else if (is_singular('sermons')) {
$subHead = get_field('sermons_subtitle');
} else if (is_singular('chordcharts')) {
$subHead = get_field('chord_charts_artist_name');
} else {
$subHead = 'Door of Hope';
}
if (is_post_type_archive('events')) {
$subHead = 'Community';
$title = 'Door of Hope Events';
} elseif (is_post_type_archive('soulsessions')) {
$subHead = 'Media';
$title = 'Soul Sessions';
} elseif (is_post_type_archive('songsfromsunday')) {
$subHead = 'Media';
$title = 'Songs from Sunday';
} elseif (is_post_type_archive('sermons')) {
$title = 'Sermons';
} elseif (is_post_type_archive('chordcharts')) {
$title = 'Chord Charts';
} else {
$title = get_the_title();
}
?>
<div class="Row">
<div class="Span-12">
<h2 class="Header-subHead"><?php echo $subHead; ?></h2>
<h1 class="Header-headline"><?php echo $title; ?></h1>
</div>
</div>
<?php endif; ?>
</div>
<?php
global $post;
$children = get_pages( array( 'child_of' => $post->ID ) );
$has_children = count( $children ) > 0;
$isEventsPage = is_post_type_archive('events');
$isSongsFromSundayPage = is_post_type_archive('songsfromsunday');
$isSoulSessionsPage = is_post_type_archive('soulsessions') || is_singular('soulsessions');
$isChordChartsPage = is_post_type_archive('chordcharts') || is_singular('chordcharts');
if ((is_page() && ($post->post_parent || $has_children) || $isEventsPage || $isSoulSessionsPage || $isChordChartsPage || $isSongsFromSundayPage)) {
get_template_part( 'partials/nav', 'subpage' );
}
?>
}
?>