您可以创建custom post type 对于如下所示的徽标,
function create_post_type() {
register_post_type( \'logo\',
array(
\'labels\' => array(
\'name\' => __( \'Logos\' ),
\'singular_name\' => __( \'Logo\' ),
\'add_new\' => __( \'Add New\' ),
\'add_new_item\' => __( \'Add New Logo\' ),
\'featured_image\' => __( \'Add Image\' ),
\'edit_item\' => __( \'Edit Logo\' )
),
\'public\' => true,
\'menu_icon\' => \'dashicons-images-alt2\',
\'has_archive\' => true,
\'rewrite\' => array(\'slug\' => \'logo\'),
\'supports\' => array(\'title\',\'thumbnail\'),
)
);
}
add_action( \'init\', \'create_post_type\' );
在主题函数中添加上述代码。php文件。
然后,用post循环替换静态徽标。