php程序的网站如何在顶部调用一个已经单独存在的html页面

php中文网
发布: 2016-06-13 13:47:49
原创
1292人浏览过
php程序的网站怎么在顶部调用一个已经单独存在的html页面
wordpess怎么在页面上调用一个独立的html页面

我要在wordpress 的顶部调用一个已经存在的单独的html页面 要怎么才能实现

因为修改了html用了一些CSS 直接用代码会造成页面错位,所以只能调用html页面


PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->



<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>"><title>
<?php global $page, $paged;
    if(is_home()){ $options = get_option('xiaohan_options'); echo($options['indextitle']);}else{wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    if ( $paged >= 2 || $page >= 2 )
        echo ' | ' . sprintf( __( 'Page %s', 'xiaohan' ), max( $paged, $page ) );
    }
?>
</title><?php if (is_home()){
    $options = get_option('xiaohan_options');
    $description = ($options['indexdescription']);
    $keywords = ($options['indexkeyword']);
} elseif (is_single()){
    if ($post->post_excerpt) {
        $description = $post->post_excerpt;
    } else {
        $description = utf8_CsubStr(strip_tags($post->post_content),0,190);
    }
    $keywords = "";
    $tags = wp_get_post_tags($post->ID);
    foreach ($tags as $tag ) {
        $keywords = $keywords . $tag->name . ", ";
    }
} elseif (is_category()){
    $description = strip_tags(category_description());
    $categoryname = get_the_category();
    $keywords = $categoryname[0]->cat_name;
}
?> 
<meta name="keywords" content="<?php echo $keywords; ?>"><meta name="description" content="<?php echo $description; ?>">
//下面这行是代码,想要在这位置插入,因为修改了html用了一些CSS 直接用代码会造成页面错位,所以只能调用html页面
<script src="http://www.sbisyou.com/plus/ad_js.php?aid=5" language="javascript"></script><link rel="stylesheet" href="<?php%20bloginfo('stylesheet_url');%20?>" type="text/css" media="screen"><link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php%20%24options%20=%20get_option('xiaohan_options');%20if%20(%24options%5B'feed_url'%5D)%20%7Becho(%24options%5B'feed_url'%5D);%7D%20else%20%20bloginfo('rss2_url');%20?>"><link rel="pingback" href="<?php%20bloginfo('pingback_url');%20?>"><?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?><script type="text/javascript" src="<?php%20bloginfo('template_url');%20?>/js/base.js"></script><?php $options = get_option('xiaohan_options'); if ($options['submenu']){?><link rel="stylesheet" href="<?php%20bloginfo('template_url');%20?>/superfish.css" type="text/css" media="screen"><script type="text/javascript" src="<?php%20bloginfo('template_url');%20?>/js/jquery-1.2.6.min.js"></script><script type="text/javascript" src="<?php%20bloginfo('template_url');%20?>/js/hoverIntent.js"></script><script type="text/javascript" src="<?php%20bloginfo('template_url');%20?>/js/superfish.js"></script><script type="text/javascript" src="<?php%20bloginfo('template_url');%20?>/js/jquery.bgiframe.min.js"></script><script type="text/javascript">  
    $(document).ready(function(){ 
        $("ul.menu").superfish().find('ul').bgIframe({opacity:false}); 
    });  
</script>}else{?>
<style>#nav ul.sub-menu{display:none;}</style><?php }?><?php wp_head(); ?>>
<div id="top">
    <div id="header">
        <div id="blog_title">
            <h1><a href="<?php%20echo%20get_option('home');%20?>/"><?php bloginfo('name'); ?></a></h1>
            <p><?php bloginfo('description'); ?></p>
                    <div class="aritcle_card">
                        <a class="aritcle_card_img" href="/ai/2062">
                            <img src="https://img.php.cn/upload/ai_manual/000/000/000/175680147413246.png" alt="稿定在线PS">
                        </a>
                        <div class="aritcle_card_info">
                            <a href="/ai/2062">稿定在线PS</a>
                            <p>PS软件网页版</p>
                            <div class="">
                                <img src="/static/images/card_xiazai.png" alt="稿定在线PS">
                                <span>99</span>
                            </div>
                        </div>
                        <a href="/ai/2062" class="aritcle_card_btn">
                            <span>查看详情</span>
                            <img src="/static/images/cardxiayige-3.png" alt="稿定在线PS">
                        </a>
                    </div>
                
            <div class="banner">
<?php // Check if this is a post or page, if it has a thumbnail, and if it's a big one
                    $options = get_option('xiaohan_options');
                    $banner_link = $options['banner_link'];
                    $banner_link_target = $options['banner_link_target'];
                    $banner_link_xfn = $options['banner_link_xfn'];
                    if ( is_singular() &&
                            has_post_thumbnail( $post->ID ) &&
                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
                            $image[1] >= HEADER_IMAGE_WIDTH ) :
                        // Houston, we have a new header image!
                        echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
                    else : ?>
                                            <a href="<?php%20echo%20%24banner_link;?>" if echo target="_blank"><?php if($banner_link_xfn==1) echo ' rel="nofollow"'; ?>><img src="<?php%20header_image();%20?>"    style="max-width:90%" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt=""></a>
                    <?php endif; ?>
</div>
        </div>
        <div id="nav">
            <?php wp_nav_menu('container=\'\'&menu_id=menu&title_li=&link_before=<span>&link_after='); ?>
            <div class="rss_ico"><a href="<?php%20%24options%20=%20get_option('xiaohan_options');%20if%20(%24options%5B'feed_url'%5D)%20%7Becho(%24options%5B'feed_url'%5D);%7D%20else%20%20bloginfo('rss2_url');%20?>" target="_blank" rel="nofollow"><img src="<?php%20bloginfo('template_url');%20?>/images/rss_ico.gif"    style="max-width:90%"  style="max-width:90%" alt="RSS 订阅"></a></div>
        </div>
    </div>
</div>

<div id="wrap">


 <div class="clear"></div>
</div>
登录后复制
相关标签:
php
PHP速学教程(入门到精通)
PHP速学教程(入门到精通)

PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号