Skip to content

Instantly share code, notes, and snippets.

@mono96
mono96 / customize_jp4wc_tracking_url
Created February 15, 2021 06:38
jp4wc_tracking_urlフック
function my_carrier_tracking_data(){
$my_carrier_tracking_url_data = array(
'hoge' => array(
'title' => __( 'hoge', 'jp4wc-pro' ),
'url' => 'https://example.com/hoge/',
),
'hogehoge' => array(
'title' => __( 'hogehoge', 'jp4wc-pro' ),
'url' => 'https://example.com/hoge/',
),
li.c-meta__item.c-meta__item--author {
display: none;
}
// summary を読み込みさせない
add_filter(
'snow_monkey_get_template_part_template-parts/loop/entry-summary/content/content',
function( $name, $vars ) {
?>
<div class="my-summary">
</div>
<?php
},
10,
/* ブログカードは透明で背景色とかぶっちゃうので白に */
.wp-oembed-blog-card {
background-color: #fff;
}
/* ブログカード */
.wp-oembed-blog-card {
box-shadow:none;
border-radius: 0;
background-color:#F8F9FA;
// ブログカードカスタマイズ
// 取得成功時
add_filter(
'wp_oembed_blog_card_blog_card_template',
function( $html, $cache ) {
$url = '';
preg_match( '/<a href=\"(.*?)\".*?>/mis', $html, $matches );
if ( is_array( $matches ) && 1 <= count( $matches ) ) {
$url = $matches[1];
@mono96
mono96 / tag_search_controlpanel_wordPress_mono96.php
Last active November 13, 2019 09:17
tag_search_controlpanel_wordPress_mono96
//投稿一覧リストの上にタグフィルターを追加
function custmuize_restrict_manage_posts_exsample(){
global $post_type, $tag;
if ( is_object_in_taxonomy( $post_type, 'post_tag' ) ) {
$dropdown_options = array(
'show_option_all' => get_taxonomy( 'post_tag' )->labels->all_items,
'hide_empty' => 0,
'hierarchical' => 1,
'show_count' => 0,
'orderby' => 'name',
.wp-embed-featured-image img {
display:none;
}
.wp-embed-excerpt {
display: none !important;
}
.wp-embed {
background-color: #f6f6f6;
function my_embed_styles() {
wp_enqueue_style( 'wp-oembed-embed', '/wp-content/themes/css/wp-oembed-embed.css' );
}
add_action( 'embed_head', 'my_embed_styles' );
@font-face {
font-family: "Yu Gothic";
src: local("Yu Gothic Medium");
font-weight: 100;
}
@font-face {
font-family: "Yu Gothic";
src: local("Yu Gothic Medium");
font-weight: 200;
}