php - Wordpress include plugin in post page -
hi trying use advanced layer slider in wordpress post page. code pasted in header.php file works on pages, not posts, can see shortcode showing though in top of posts page. there anyway include code needed plugin easily?
thanks in advanced,
james
sorry formatting
single.php
<?php global $avia_config; /* * get_header basic wordpress function, used retrieve header.php file in theme directory. */ get_header(); $title = __('blog - latest news', 'avia_framework'); //default blog title $t_link = home_url('/'); $t_sub = ""; if(avia_get_option('frontpage') && $new = avia_get_option('blogpage')) { $title = get_the_title($new); //if blog attached page use title $t_link = get_permalink($new); $t_sub = avia_post_meta($new, 'subtitle'); } if( get_post_meta(get_the_id(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));
?> '>
<div class='container template-blog template-single-blog '> <main class='content units <?php avia_layout_class( 'content' ); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>> <?php /* run loop output posts. * if want overload in child theme include file * called loop-index.php , used instead. * */ get_template_part( 'includes/loop', 'index' ); //show related posts based on tags if there get_template_part( 'includes/related-posts'); //wordpress function loads comments template "comments.php" comments_template( '/includes/comments.php'); ?> <!--end content--> </main> <?php $avia_config['currently_viewing'] = "blog"; //get sidebar get_sidebar(); ?> </div><!--end container--> </div><!-- close default .container_wrap element -->
page.php
<?php
global $avia_config;
/* * get_header basic wordpress function, used retrieve header.php file in theme directory. */ get_header(); if( get_post_meta(get_the_id(), 'header', true) != 'no') echo avia_title(); ?> <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'> <div class='container'> <main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>> <?php /* run loop output posts. * if want overload in child theme include file * called loop-page.php , used instead. */ $avia_config['size'] = avia_layout_class( 'main' , false) == 'entry_without_sidebar' ? '' : 'entry_with_sidebar'; get_template_part( 'includes/loop', 'page' ); ?> <!--end content--> </main> <?php //get sidebar $avia_config['currently_viewing'] = 'page'; get_sidebar(); ?> </div><!--end container--> </div><!-- close default .container_wrap element -->
header.php
<?php global $avia_config; $style = $avia_config['box_class']; $responsive = avia_get_option('responsive_layout','responsive'); $blank = isset($avia_config['template']) ? $avia_config['template'] : ""; $headers = !$blank ? avia_header_setting() : ""; $headermenu = $responsive ? avia_get_option('header_menu','mobile_drop_down') : "";
?> class=" "> " />
rss2 feed" href="" /> " />
'; ?> * tag of theme, or break many plugins, * use hook add elements such * styles, scripts, , meta tags. */ wp_head(); ?>'body')); ?>>
<div id='wrap_all'> <?php if(!$blank){ ?> <header id='header' class=' header_color <?php avia_is_dark_bg('header_color'); echo " ".$headermenu; ?>' <?php avia_markup_helper(array('context' => 'header','post_type'=>'forum'));?>> <?php if($responsive && $headermenu == 'mobile_slide_out') { echo '<a id="advanced_menu_toggle" href="#" '.av_icon_string('mobile_menu').'></a>'; echo '<a id="advanced_menu_hide" href="#" '.av_icon_string('close').'></a>'; } $social_args = array('outside'=>'ul', 'inside'=>'li', 'append' => ''); //subheader, display when user chooses social header if(strpos($headers,'social_header') !== false) { ?> <div id='header_meta' class='container_wrap container_wrap_meta'> <div class='container'> <?php /* * display themes social media icons, defined in wordpress backend * avia_social_media_icons function located in includes/helper-social-media-php */ if(strpos($headers,'bottom_nav_header') === false) avia_social_media_icons($social_args); //display small submenu echo "<nav class='sub_menu' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">"; $avia_theme_location = 'avia2'; $avia_menu_class = $avia_theme_location . '-menu'; $args = array( 'theme_location'=>$avia_theme_location, 'menu_id' =>$avia_menu_class, 'container_class' =>$avia_menu_class, 'fallback_cb' => '', 'container'=>'', 'echo' =>false ); $nav = wp_nav_menu($args); echo $nav; $phone = avia_get_option('phone'); $phone_class = !empty($nav) ? "with_nav" : ""; if($phone) echo "<div class='phone-info {$phone_class}'><span>{$phone}</span></div>"; /* * hook can used plugins , theme extensions (currently: wpml language selector) */ do_action('avia_meta_header'); echo '</nav>'; ?> </div> </div> <?php } ?> <div id='header_main' class='container_wrap container_wrap_logo'> <?php /* * hook can used plugins , theme extensions (currently: woocommerce shopping cart) */ do_action('ava_main_header'); ?> <div class='container'> <?php /* * display theme logo checking if default logo overwritten in backend. * function located @ framework/php/function-set-avia-frontend-functions.php in case need edit output */ echo avia_logo(avia_base_url.'images/layout/logo.png', false, 'strong'); if(strpos($headers,'social_header') !== false && strpos($headers,'bottom_nav_header') !== false) avia_social_media_icons($social_args); /* * display main navigation menu * modify output in wordpress admin backend @ appearance->menus */ $extraopen = $extraclose = ""; if(strpos($headers,'bottom_nav_header') !== false){ $extraclose = "</div></div><div id='header_main_alternate' class='container_wrap'><div class='container'>"; } echo $extraclose; echo "<nav class='main_menu' data-selectname='".__('select page','avia_framework')."' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">"; $avia_theme_location = 'avia'; $avia_menu_class = $avia_theme_location . '-menu'; $args = array( 'theme_location' => $avia_theme_location, 'menu_id' => $avia_menu_class, 'container_class' => $avia_menu_class, 'fallback_cb' => 'avia_fallback_menu', 'walker' => new avia_responsive_mega_menu() ); wp_nav_menu($args); echo '</nav>'; /* * hook can used plugins , theme extensions */ do_action('ava_after_main_menu'); ?> <!-- end container--> </div> <!-- end container_wrap--> </div> <div class='header_bg'></div> <!-- end header --> </header> <?php } //end blank check ?> <div id='main'>
Comments
Post a Comment