小编jak*_*spo的帖子

垂直对齐图像

我有一个包含图像和ap标签的div(见下文).我想根据段落的行数垂直对齐div中间的图像.垂直对齐不起作用.我现在正在使用JavaScript来计算添加到margin-top的数量,但宁可使用CSS.有任何想法吗?

<div>
    <img>
    <p>Multi-line</p>
</div>
Run Code Online (Sandbox Code Playgroud)

css vertical-alignment

29
推荐指数
2
解决办法
3万
查看次数

每月Wordpress帖子数

我需要在Wordpress中运行查询以获取每月有多少帖子,包括零.

我的查询现在返回我想要返回的内容的第一部分:

select
distinct date_format(post_date, '%y') "year",
date_format(post_date, '%b') "month",
from wp_posts
where post_type = 'post'
and post_status = 'publish'
group by date_format(post_date, '%y'), date_format(post_date, '%b')
order by date_format(post_date, '%y') desc, post_date
Run Code Online (Sandbox Code Playgroud)

它返回如下内容:

|   year   |   month   |   count   |
------------------------------------
|   10     |   Jan     |     4     |
|   10     |   Feb     |     2     |
|   10     |   Mar     |     1     |
|   10     |   Apr     |     6     |
|   09     |   Jan     |     4     |
|   09     |   Feb …
Run Code Online (Sandbox Code Playgroud)

mysql sql wordpress

1
推荐指数
1
解决办法
1311
查看次数

标签 统计

css ×1

mysql ×1

sql ×1

vertical-alignment ×1

wordpress ×1