我想在Wordpress博客上使用我网站的页眉、顶部菜单和页脚。网站本身不是Wordpress网站,但博客是并驻留在我的服务器上的“博客”文件夹中。
所以我想我需要做的是编辑博客的标题。php文件使用我的网站标题作为初学者(菜单和页脚也一样),但由于对Wordpress来说相对较新,我发现很难浏览Wordpress的标题。php文件。
如何使用直接url调用页眉/菜单/页脚以覆盖主题页眉。
这似乎是可能的,但更像是一种“黑客”,我在任何地方都找不到明确的答案。有那么难/难做吗??
以下是Wordpress标题的代码。php的标题
<?php
/*
* Header Section of Iconic One
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress - Themonic Framework
* @subpackage Iconic_One
* @since Iconic One 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\' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
<?php include($_SERVER[\'DOCUMENT_ROOT\'] . "/includes/header.php") ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<?php if ( get_theme_mod( \'themonic_logo\' ) ) : ?>
<div class="themonic-logo">
<a href="<?php echo esc_url( home_url( \'/\' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( \'name\', \'display\' ) ); ?>" rel="home"><img src="<?php echo get_theme_mod( \'themonic_logo\' ); ?>" alt="<?php echo esc_attr( get_bloginfo( \'name\', \'display\' ) ); ?>"></a>
</div>
<?php if( get_theme_mod( \'iconic_one_social_activate\' ) == \'1\') { ?>
<div class="socialmedia">
<a href="<?php echo get_theme_mod( \'twitter_url\', \'default_value\' ); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/ img/twitter.png" alt="Follow us on Twitter"/></a> <a href="<?php echo get_theme_mod( \'facebook_url\', \'default_value\' ); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/facebook.png" alt="Follow us on Facebook"/></a> <a href="<?php echo get_theme_mod( \'plus_url\', \'default_value\' ); ?>" rel="author" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/gplus.png" alt="Follow us on Google Plus"/></a><a href="<?php echo get_theme_mod( \'rss_url\', \'default_value\' ); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/rss.png" alt="Subscribe RSS"/></a>
</div>
<?php } ?>
<?php else : ?>
<hgroup>
<a href="<?php echo esc_url( home_url( \'/\' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( \'name\', \'display\' ) ); ?>" rel="home"><?php bloginfo( \'name\' ); ?></a>
<br .../> <a class="site-description"><?php bloginfo( \'description\' ); ?></a>
</hgroup>
<?php if( get_theme_mod( \'iconic_one_social_activate\' ) == \'1\') { ?>
<div class="socialmedia">
<a href="<?php echo get_theme_mod( \'twitter_url\', \'default_value\' ); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/twitter.png" alt="Follow us on Twitter"/></a> <a href="<?php echo get_theme_mod( \'facebook_url\', \'default_value\' ); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/facebook.png" alt="Follow us on Facebook"/></a> <a href="<?php echo get_theme_mod( \'plus_url\', \'default_value\' ); ?>" rel="author" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/gplus.png" alt="Follow us on Google Plus"/></a><a href="<?php echo get_theme_mod( \'rss_url\', \'default_value\' ); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/rss.png" alt="Follow us on rss"/></a>
</div>
<?php } ?>
<?php endif; ?>
<nav id="site-navigation" class="themonic-nav" role="navigation">
<a class="assistive-text" href="#content" title="<?php esc_attr_e( \'Skip to content\', \'themonic\' ); ?>"><?php _e( \'Skip to content\', \'themonic\' ); ?></a>
<?php wp_nav_menu( array( \'theme_location\' => \'primary\', \'menu_id\' => \'menu-top\', \'menu_class\' => \'nav-menu\' ) ); ?>
</nav><!-- #site-navigation -->
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<a href="<?php echo esc_url( home_url( \'/\' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
<?php endif; ?><div class="clear"></div>
</header><!-- #masthead -->
<div id="main" class="wrapper">