我是 wordpress 开发的新手。我试图将响应式 html 页面转换为 wordpress 主题,但 html 页面的 CSS 在 wordpress 主题中无法正常工作。请看下面的图片:
HTML 页眉
wordpress 主题标题
我无法弄清楚为什么 wordpress 主题标题与 html 页面标题不同而 Style.css
相同。
请向我建议如何解决这个问题。
最佳答案
这里是调用WordPress目录图片、样式或帖子等的全部过程,请查收。
default CSS call
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" media="screen" />
<a href="php?page_id=318"><h6 class="add-to-cart"></h6></a>-------page call
<?php get_header(); ?>---------------------------------------header show
<?php get_sidebar(); ?>--------------------------------------to call slider.php
<?php dynamic_sidebar( 'sidebar name include ' ); ?>-----to show slider wigdts
<?php dynamic_sidebar('New 1'); ?>---------------------------sidebar
<?php get_footer(); ?>---------------------------------------footer show
<?php get_template_directory(); ?> --------------------------dirctory path
<?php echo get_template_directory_uri(); ?>------------------script path
<?php the_title(''); ?>--------------------------------------title show
<?php the_excerpt(''); ?>------------------------------------content show
<p><?php echo substr(get_the_excerpt(), 0,170); ?></p>------content LIMIT
<?php get_search_form(); ?>-----search
<?php the_permalink(''); ?>----------------------------------post ka link(like click on title of post and it show inside the post)
<?php bloginfo('template_url');?>/images---------------------image path
<link href="<?php bloginfo('template_url'); ?>/css/global-style.css" type="text/css" rel="stylesheet">-- css path in header file
<?php echo the_post_thumbnail(''); ?>------------------------image show
还有很多,但是列表太长了,它会帮助你把静态的html变成动态的
关于html - 如何在wordpress主题中注册html页面的CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38844488/