본문 바로가기

Wordpress/워드프레스 노하우

(33)
CPT UI, ACF 이용 시 참고 사이트 https://www.elliotcondon.com/advanced-custom-fields-admin-custom-columns/https://code.tutsplus.com/articles/add-a-custom-column-in-posts-and-custom-post-types-admin-screen--wp-24934 http://thestizmedia.com/custom-post-type-filter-admin-custom-taxonomy/ 업데이트 예정
워드프레스 멀티사이트 플러그인 비활성화가 안될때 비활성화 다했는디네트워크 설치할려고 하니까 플러그인을 비활성화하라고 할 때는UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';active_plugins 의 값을 a:0:{} 으로 변경 해주면 된댜~
엔폴드 mp4 lightbox 비디오 주소뒤에 ?iframe=true 를 추가.
wp_query 현재 포스트 제외하는 방법 'post__not_in' => array($currentID)));while ( $my_query->have_posts() ) : $my_query->the_post(); ?>">post__not_in 을 통해 현재 포스트의 id를 제외시켜버리면 된다.
워드프레스 이전작업, 복사작업 후 db 테이블 변경 쿼리 UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'htt..
Kboard 특정 게시판 리스트 정렬 순서 KBContentList.class.php 수정. if ($this->board_id == 게시판번호)$orderby = apply_filters('kboard_list_orderby', '`date` ASC', $this->board_id); $this->sort 의 종류 날짜순: date추천순: vote조회순: view업데이트순: update
멀티사이트 prefix 디렉토리 설정일때 ※ htaccess 수정 # BEGIN WordPressRewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]# add a trailing slash to /wp-adminRewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]RewriteCond %{REQUEST_FILENAME} -f [OR]RewriteCond %{REQUEST_FILENAME} -dRewriteRule ^ - [L]RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wordpress/$2 [L]RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)..
워드프레스 페이지 body에 slug 명 추가하기 //Page Slug Body Classfunction add_slug_body_class( $classes ) {global $post;if ( isset( $post ) ) {$classes[] = $post->post_type . '-' . $post->post_name;}return $classes;}add_filter( 'body_class', 'add_slug_body_class' ); http://www.wpbeginner.com/wp-themes/how-to-add-page-slug-in-body-class-of-your-wordpress-themes/