본문 바로가기
반응형

web25

web tts html과 javascript를 사용해서 텍스트를 읽어주는 코드. HTML(voice.html) Things to Say: This is a test! Timbre: Pitch: Speed: 시작 종료 Script(voice.js) function loadVoices() { var synthesizer = window.speechSynthesis; synthesizer.onvoiceschanged = loadVoices_VoicesLoaded; synthesizer.getVoices(); } function handleError(error) { console.error("TTS 에러 발생:", error); alert("TTS를 사용할 수 없습니다. 브라우저 설정을 확인해주세요."); } function.. 2023. 5. 15.
워드프레스 아카이브 뜻, 커스텀 포스트 타입 아카이브 설정 아카이브란? 워드프레스 아카이브는 지정된 기준으로 그룹화된 글목록 말한다. 예를들어, 카테고리, 글쓴이, 태그 등의 기준이 있다. 커스텀 포스트 타입 아카이브 설정 커스텀 포스트 타입도 아카이브의 기준이 될 수 있다. 이를 위해서 주소창에 post_type='커스텀 포스트 타입'을 준다. 예를들면 바로 아래 링크와 같다. http://account.local/?post_type=account 하지만 이보다 간단히 아카이브 링크를 가질 수도 있다. register_post_type > has_archive 필드를 true로 설정하는 것이다. 2023. 5. 15.
워드프레스 커스텀 포스트 타입의 기본 에디터 설정 워드프레스에서 커스텀 포스트 타입을 생성하면 편집기는 기본적으로 클래식 에디터로 지정됩니다. 하지만 'show_in_rest' 필드를 true로 설정하면 블록 에디터로 설정됩니다. 설정 코드 테마의 functions.php에서 register_post_type의 옵션으로 show_in_rest을 true로 설정합니다. 2023. 5. 15.
워드프레스 관리자 메뉴 아이콘 설정 커스텀 포스트 타입을 추가(링크)하고 메뉴의 순서를 조정(링크)했다. 다음으로 메뉴의 아이콘을 지정할 수 있다. register_post_type의 옵션 파라미터에서 menu_icon 필드에 값을 지정한다. 'menu_icon' => 'dashicons-archive', 아이콘 목록은 아래 링크 참조 WordPress Developer Resources | Official WordPress Developer Resources Official WordPress developer resources including a code reference, handbooks (for APIs, plugin and theme development, block editor), and more. developer.wordp.. 2023. 5. 14.
반응형