我想更改作为链接响应的区域。页面输出是一个圆圈网格,其中包含我的团队成员。目前用我的鼠标悬停时出现的文本是可点击的,我想将其更改为整个内圈。陈述的代码如下:
所以div sc_team_member_inner需要链接而不是sc_team_member_name。
抱歉非常基本的PHP问题..提前致谢!
<?php
if ( $members->have_posts() ) {
while ( $members->have_posts() ) {
$members->the_post();
?>
<div itemscope itemtype="http://schema.org/Person" class="sc_team_member">
<div class="sc_team_member_inner">
<?php
if ( has_post_thumbnail() )
echo the_post_thumbnail( 'medium' ) ;
else {
echo '<img src="' . SC_TEAM_URL . 'inc/img/noprofile.jpg" class="attachment-medium wp-post-image"/>';
}
?>
<?php if ( 'yes' == $this->options[ 'name' ] ) : ?>
<div itemprop="name" class="sc_team_member_name">
<a href="<?php the_permalink() ?>" rel="bookmark" class="<?php echo $this->check_clicker( $single_template ); ?>">
<?php the_title() ?>
答案 0 :(得分:1)
以下是我认为你想要的一个例子?
require 'yaml/store'
class YAML::Store
def dig(*keys)
first_val = self[keys.shift]
if keys.empty?
first_val
else
keys.reduce(first_val) do |result, key|
first_val[key]
end
end
end
end
class YamlStore
attr_reader :store
def initialize filename
@store = YAML::Store.new filename
end
def get *keys
@store.transaction do
@store.dig *keys
end
end
def set *keys, val
@store.transaction do
final_key = keys.pop
hash_to_set = keys.empty? ? @store : @store.dig(*keys)
hash_to_set.send :[]=, final_key, val
end
end
end
filename = 'store.yml'
db = YamlStore.new filename
db.set :a, {}
puts db.get :a
# => {}
db.set :a, :b, 1
puts db.get :a, :b
# => 1
.sc_team_member_name {
height: 10em;
width: 10em;
border-radius: 50%;
border: 2px solid black;
}
.sc_team_member_name a {
display: block;
height: 100%;
width:100%;
text-align: center;
border: 1px solid red;
border-radius: 50%;
}
a:hover {
background: rgba(255,0,0,0.5);
}