티스토리 뷰

반응형

링크로 기본적으로 안돼있으면 여러 이미지를 올릴때 기본으로 이미지 jpg 만으로 링크가되서 Page 로 연결 하려면 모두 수작업으로 Attchment Page 변경 해야 하죠? 기본 이미지로 링크 되는것보다 페이지가 추가되서 연결되는게 더 많은 컨텐츠 페이지를 만드는데 도움이 되겠지요?

wordpress theme 폴더에 있는 functions.php 을 수정해

이 코드를 추가하면 됩니다 저는 맨 아래 추가합니다

wp-content/themes/자신의 테마 이름/functions.php

수정 전에 자신의 컴퓨터에 백업으로 저장해 두면 좋겠네요

문제가 발생하면 다시 덥어씌우면 됩니다



/**
* Set the Attachment Display Settings "Link To" default to "none"
*
* This function is attached to the 'after_setup_theme' action hook.
*/
function default_attachment_display_settings() {
update_option( 'image_default_align', 'left' );
update_option( 'image_default_link_type', 'none' );
update_option( 'image_default_size', 'large' );
}



아래는 옵션

image_default_align

  • left
  • right
  • center
  • none

image_default_link_type

  • file
  • post
  • custom
  • none

image_default_size

  • thumbnail
  • medium
  • large
  • full

참조

http://www.trickspanda.com/2014/01/set-default-attachment-display-settings-wordpress/





반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/06   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
글 보관함