我已经将colorbox jQuery灯箱用于我的灯箱.但在那个人应该点击按钮.我想要在加载窗口时自动弹出窗口.
我的灯箱代码是
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
$(".ajax").colorbox();
});
</script>
</head>
<body>
<h2>Other Content Types</h2>
<p><a class='ajax' href="../content/daisy.jpg" title="Homer Defined">Outside HTML (Ajax)</a></p>
</html>
Run Code Online (Sandbox Code Playgroud)
现在我想在加载窗口时自动弹出窗口.
我必须从下面的代码中获取图像源.
$thumburl = get_the_post_thumbnail($post->ID);
Run Code Online (Sandbox Code Playgroud)
我在这里
<img width="325" height="202" src="http://localhost/TantraProjects/Border-fall/Repo/WebApp/wp-content/uploads/2012/12/film.png" class="attachment-post-thumbnail wp-post-image" alt="film" title="film">
Run Code Online (Sandbox Code Playgroud)
我想得到这个部分.
"http://localhost/TantraProjects/Border-fall/Repo/WebApp/wp-content/uploads/2012/12/film.png"
Run Code Online (Sandbox Code Playgroud)
我怎样才能得到消息来源?
我必须按上次修改日期显示帖子.所以我用下面的代码.
$args = array(
'post_type' => $post_type,
'numberposts' => '2',
'orderby' => 'modified',
'order'=> 'ASC',
);
$the_query = new WP_Query( $args );
Run Code Online (Sandbox Code Playgroud)
但我在上面的代码中找不到任何更新.我应该使用其他东西而不是'orderby' => 'modified'参数.
我想为文字装饰上色.我从w3schools获得了一个教程
并试过这个
text-decoration: underline;
text-decoration-color: #dddddd;
Run Code Online (Sandbox Code Playgroud)
但它没有用.这不是有效的吗?还有其他方法可以为下划线着色吗?
我必须得到名字以字母"A"开头的所有用户.我通过使用get_users()函数获取用户信息.如何使用参数查询来获取名字以"A"开头的用户?
我使用下面的功能
<?php $users = get_users(array('role' => 'user_role',
'meta_key' => 'first_name',
'meta_value' => 'A*',
'meta_compare' => 'LIKE'));
Run Code Online (Sandbox Code Playgroud)
我没有找到任何结果.这里有错吗?
当我调整窗口大小时,我可以找到窗口的大小.就像这样
<script type="text/javascript">
jQuery(window).resize(function () {
var width = jQuery(window).width();
var height = jQuery(window).height();
console.log(width);
console.log(height);
})
</script>
Run Code Online (Sandbox Code Playgroud)
现在我想在调整窗口大小时获取文档大小.每次调整窗口大小时,如何获得大小.
我有一个像这样的条件
if ( ( $red == '50' && $city == 'Bali' ) || ( $red == '50' && $city == 'BALI' ) ) {
//My code here
}
Run Code Online (Sandbox Code Playgroud)
我如何结合条件并写一行.php中有任何功能吗?
我在foreach循环中几乎没有混淆.
foreach我的下面代码中有一个:
foreach ($myrows as $rows){
$option = $rows->option_value;
$option_value = recursive_unserialize_replace($site_url,$_POST['url_name'],$option);
$sql.= '('."'".$rows->option_name."'".','."'".$option_value."'".','."'".$rows->autoload."'".')'.",";
}
Run Code Online (Sandbox Code Playgroud)
看看第3行.我用过一个逗号来打印.现在我不想在最后一行打印逗号.
我有一个页面来显示所有用户.用户类型是作者.显示所有代理.
$args = array(
'role' => 's2member_level2',
'meta_query' => array(
array(
'key' => $filter,
'value' => $_GET['filter'],
'compare' => 'LIKE'
)
)
);
}
$users = get_users($args);
if ($users) {
foreach ($users as $user) {
$user_profile_data = get_user_meta($user->ID,'wp_s2member_custom_fields',true);
//print_r($user_profile_data);
echo '<div class="user_data" >';
echo '<a href="'.site_url().'/author/'.$user->user_login.'">'.user_avatar_get_avatar($user_info->ID,'110').'</a>';
echo '<div class="user-info">';
//print_r($users);
echo '<h6>'.'<a href="'.site_url().'/author/'.$user->user_login.'">'.$user->display_name.'</a></h6>';
if ($user_profile_data[contact_number])
echo '<p> call-'.$user_profile_data[contact_number].'</p>';
else
echo '<p> Phone number not specified.</p>';
echo '<p>'.$user->user_email.'</p>';
echo '</div>';
echo '<div class="agent_specify" >';
$agent_specify = $user_profile_data[posting_preferance];
echo '<p>Agent Speciality :</p>'; …Run Code Online (Sandbox Code Playgroud)