0

update - the header.php in question: question is: where to add the new line

<?php 
echo do_shortcode("[metaslider id=36]"); ?>

at the moment i do not know where to add....

<?php

// Exit if accessed directly
if( !defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * Header Template
 *
 *
 * @file           header.php
 * @package        Responsive
 * @author         Emil Uzelac
 * @copyright      2003 - 2014 CyberChimps
 * @license        license.txt
 * @version        Release: 1.3
 * @filesource     wp-content/themes/responsive/header.php
 * @link           http://codex.wordpress.org/Theme_Development#Document_Head_.28header.php.29
 * @since          available since Release 1.0
 */
?>
    <!doctype html>
    <!--[if !IE]>
    <html class="no-js non-ie" <?php language_attributes(); ?>> <![endif]-->
    <!--[if IE 7 ]>
    <html class="no-js ie7" <?php language_attributes(); ?>> <![endif]-->
    <!--[if IE 8 ]>
    <html class="no-js ie8" <?php language_attributes(); ?>> <![endif]-->
    <!--[if IE 9 ]>
    <html class="no-js ie9" <?php language_attributes(); ?>> <![endif]-->
    <!--[if gt IE 9]><!-->
<html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
    <head>

        <meta charset="<?php bloginfo( 'charset' ); ?>"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <title><?php wp_title( '&#124;', true, 'right' ); ?></title>

        <link rel="profile" href="http://gmpg.org/xfn/11"/>
        <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"/>

        <?php wp_head(); ?>
    </head>

<body <?php body_class(); ?>>


<?php responsive_container(); // before container hook ?>

    <?php echo do_shortcode("[metaslider id=85]"); ?>
<div id="container" class="hfeed">

<?php responsive_header(); // before header hook ?>
    <div id="header">

        <?php responsive_header_top(); // before header content hook ?>


        <?php if( has_nav_menu( 'top-menu', 'responsive' ) ) { ?>
            <?php wp_nav_menu( array(
                                   'container'      => '',
                                   'fallback_cb'    => false,
                                   'menu_class'     => 'top-menu',
                                   'theme_location' => 'top-menu'
                               )
            );
            ?>
        <?php } ?>


        <?php responsive_in_header(); // header hook ?>

        <?php if( get_header_image() != '' ) : ?>

            <div id="logo">
                <a href="<?php echo home_url( '/' ); ?>"><img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php bloginfo( 'name' ); ?>"/></a>
            </div><!-- end of #logo -->

        <?php endif; // header image was removed ?>

        <?php if( !get_header_image() ) : ?>

            <div id="logo">
                <span class="site-name"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
                <span class="site-description"><?php bloginfo( 'description' ); ?></span>
            </div><!-- end of #logo -->


        <?php endif; // header image was removed (again) ?>


        <?php if( !get_header_image() ) : ?>

            <div id="logo">
                </div><!-- end of #logo -->

        <?php endif; // header image was removed (again) ?> 



        <?php get_sidebar( 'top' ); ?>
        <?php wp_nav_menu( array(
                               'container'       => 'div',
                               'container_class' => 'main-nav',
                               'fallback_cb'     => 'responsive_fallback_menu',
                               'theme_location'  => 'header-menu'
                           )
        );
        ?>

        <?php if( has_nav_menu( 'sub-header-menu', 'responsive' ) ) { ?>
            <?php wp_nav_menu( array(
                                   'container'      => '',
                                   'menu_class'     => 'sub-header-menu',
                                   'theme_location' => 'sub-header-menu'
                               )
            );
            ?>
        <?php } ?>

        <?php responsive_header_bottom(); // after header content hook ?>

    </div><!-- end of #header -->
<?php responsive_header_end(); // after header container hook ?>

<?php responsive_wrapper(); // before wrapper container hook ?>
    <div id="wrapper" class="clearfix">
<?php responsive_wrapper_top(); // before wrapper content hook ?>
<?php responsive_in_wrapper(); // wrapper hook ?>

running wp 3.9.1 with the following things on a truely beta-page called http://www.maedchenhaus.org

theme 2014, child-theme (twentyfourteen-child) fourteen-colors-plugin

and the meta-slider-plugin (( Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides. Version 2.8.1 | By Matcha Labs | Visit plugin site ))

well i want to place the plugin in the center of the header - - similar to the following site http://www.amadeu-antonio-stiftung.de/

is this possible?

note: as it is now - it looks funny.

i have put the plugin to the first posting - see it

and besides this i have tried to put the shortcode into the header - while editing the header.php.

But this looks pretty worhless.

well question: where do i have to edit the header.php - where to put the shortcode of the meta-slider?

love to hear from you see the code that i have found out - while using firebug -

lemme know - where to add the shortcode to get the slider into the header - center.

update guess that i have to enter this code

<?php 
    echo do_shortcode("[metaslider id=36]"); 
?>

end of update

<!DOCTYPE html>
<html lang="en-US">
<head>
<body class="home blog logged-in admin-bar custom-background masthead-fixed list-view full-width grid customize-support">
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<div id="main" class="site-main">
<div id="main-content" class="main-content">
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<article id="post-7" class="post-7 post type-post status-publish format-standard hentry category-uncategorized">

see the header.php - and where i have edited it - well this is damned worthless. it makes no sense - no sense at all.

<?php
/**
 * The Header for our theme
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Twenty_Fourteen
 * @since Twenty Fourteen 1.0
 */
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width">
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
    <![endif]-->
    <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
    <?php if ( get_header_image() ) : ?>
    <div id="site-header">
        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
            <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="">
        </a>
    </div>
    <?php endif; ?>

    <header id="masthead" class="site-header" role="banner">
        <div class="header-main">
            <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

            <div class="search-toggle">
                <a href="#search-container" class="screen-reader-text"><?php _e( 'Search', 'twentyfourteen' ); ?></a>
            </div>

   [metaslider id=36]

            <nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
                <button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button>
                <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a>
                <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
            </nav>
        </div>

        <div id="search-container" class="search-box-wrapper hide">
            <div class="search-box">
                <?php get_search_form(); ?>
            </div>
        </div>
    </header><!-- #masthead -->
1

You need to put a correct code into the header.php , currently you are putting [metaslider id=36] , which is not correct, you need to replace it with this:

<?php 
echo do_shortcode("[metaslider id=36]"); ?>

This of course suppose that you have the plugin activated and a slider created with an ID = 36. I hope this will help

| improve this answer | |
  • hello Duchi - many thanks !!! i tried to do so - but with the theme called repsonsive-pro (from cyperchimps ) i have no luck. Guess that i need to know where to include the specific line ... any and all hints will greatly be appreciated. greetings martin - btw i update in the initail posting the code of the header.php in question – zero Nov 19 '14 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.