サポート » 使い方全般 » タームやカテゴリーにPVを書き込みたい

  • KUCKLU

    (@kuck1u)


    こんにちは、mura0403 さん。

    **_post_meta() 関数系はポストのカスタムフィールドのなので、以下関数を使用してみてください。各関数の使用方法は Codex などをご覧ください。

    <table>
    <thead>
    <tr>
    <th>CRUD</th>
    <th>関数名</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>C</td>
    <td>add_term_meta( <span class=”MathJax_Preview”></span><span class=”MathJax” id=”MathJax-Element-1-Frame” role=”textbox” aria-readonly=”true”><nobr><span class=”math” id=”MathJax-Span-1″ style=”width: 3.544em; display: inline-block;”><span style=”display: inline-block; position: relative; width: 2.919em; height: 0px; font-size: 120%;”><span style=”position: absolute; clip: rect(1.669em 1000em 2.815em -0.414em); top: -2.497em; left: 0.003em;”><span class=”mrow” id=”MathJax-Span-2″><span class=”mi” id=”MathJax-Span-3″ style=”font-family: STIXGeneral-Italic;”>t<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”mi” id=”MathJax-Span-4″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mi” id=”MathJax-Span-5″ style=”font-family: STIXGeneral-Italic;”>r<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”msubsup” id=”MathJax-Span-6″><span style=”display: inline-block; position: relative; width: 0.992em; height: 0px;”><span style=”position: absolute; clip: rect(1.93em 1000em 2.659em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mi” id=”MathJax-Span-7″ style=”font-family: STIXGeneral-Italic;”>m</span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span><span style=”position: absolute; top: -2.081em; left: 0.732em;”><span class=”mi” id=”MathJax-Span-8″ style=”font-size: 70.7%; font-family: STIXGeneral-Italic;”>i</span><span style=”display: inline-block; width: 0px; height: 2.242em;”></span></span></span></span><span class=”mi” id=”MathJax-Span-9″ style=”font-family: STIXGeneral-Italic;”>d<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.055em;”></span></span><span class=”mo” id=”MathJax-Span-10″ style=”font-family: STIXGeneral-Regular;”>,</span></span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span></span><span style=”border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.128em; vertical-align: -0.247em;”></span></span></nobr></span><script type=”math/tex” id=”MathJax-Element-1″>term_id, </script>meta_key, <span class=”MathJax_Preview”></span><span class=”MathJax” id=”MathJax-Element-2-Frame” role=”textbox” aria-readonly=”true”><nobr><span class=”math” id=”MathJax-Span-11″ style=”width: 5.263em; display: inline-block;”><span style=”display: inline-block; position: relative; width: 4.378em; height: 0px; font-size: 120%;”><span style=”position: absolute; clip: rect(1.669em 1000em 2.815em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mrow” id=”MathJax-Span-12″><span class=”mi” id=”MathJax-Span-13″ style=”font-family: STIXGeneral-Italic;”>m</span><span class=”mi” id=”MathJax-Span-14″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mi” id=”MathJax-Span-15″ style=”font-family: STIXGeneral-Italic;”>t<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”msubsup” id=”MathJax-Span-16″><span style=”display: inline-block; position: relative; width: 0.94em; height: 0px;”><span style=”position: absolute; clip: rect(1.93em 1000em 2.659em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mi” id=”MathJax-Span-17″ style=”font-family: STIXGeneral-Italic;”>a</span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span><span style=”position: absolute; top: -2.081em; left: 0.523em;”><span class=”mi” id=”MathJax-Span-18″ style=”font-size: 70.7%; font-family: STIXGeneral-Italic;”>v</span><span style=”display: inline-block; width: 0px; height: 2.242em;”></span></span></span></span><span class=”mi” id=”MathJax-Span-19″ style=”font-family: STIXGeneral-Italic;”>a</span><span class=”mi” id=”MathJax-Span-20″ style=”font-family: STIXGeneral-Italic;”>l<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”mi” id=”MathJax-Span-21″ style=”font-family: STIXGeneral-Italic;”>u</span><span class=”mi” id=”MathJax-Span-22″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mo” id=”MathJax-Span-23″ style=”font-family: STIXGeneral-Regular;”>,</span></span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span></span><span style=”border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.128em; vertical-align: -0.247em;”></span></span></nobr></span><script type=”math/tex” id=”MathJax-Element-2″>meta_value, </script>unique )</td>
    </tr>
    <tr>
    <td>R</td>
    <td>get_term_meta( <span class=”MathJax_Preview”></span><span class=”MathJax” id=”MathJax-Element-3-Frame” role=”textbox” aria-readonly=”true”><nobr><span class=”math” id=”MathJax-Span-24″ style=”width: 3.544em; display: inline-block;”><span style=”display: inline-block; position: relative; width: 2.919em; height: 0px; font-size: 120%;”><span style=”position: absolute; clip: rect(1.669em 1000em 2.815em -0.414em); top: -2.497em; left: 0.003em;”><span class=”mrow” id=”MathJax-Span-25″><span class=”mi” id=”MathJax-Span-26″ style=”font-family: STIXGeneral-Italic;”>t<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”mi” id=”MathJax-Span-27″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mi” id=”MathJax-Span-28″ style=”font-family: STIXGeneral-Italic;”>r<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”msubsup” id=”MathJax-Span-29″><span style=”display: inline-block; position: relative; width: 0.992em; height: 0px;”><span style=”position: absolute; clip: rect(1.93em 1000em 2.659em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mi” id=”MathJax-Span-30″ style=”font-family: STIXGeneral-Italic;”>m</span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span><span style=”position: absolute; top: -2.081em; left: 0.732em;”><span class=”mi” id=”MathJax-Span-31″ style=”font-size: 70.7%; font-family: STIXGeneral-Italic;”>i</span><span style=”display: inline-block; width: 0px; height: 2.242em;”></span></span></span></span><span class=”mi” id=”MathJax-Span-32″ style=”font-family: STIXGeneral-Italic;”>d<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.055em;”></span></span><span class=”mo” id=”MathJax-Span-33″ style=”font-family: STIXGeneral-Regular;”>,</span></span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span></span><span style=”border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.128em; vertical-align: -0.247em;”></span></span></nobr></span><script type=”math/tex” id=”MathJax-Element-3″>term_id, </script>key, $single )</td>
    </tr>
    <tr>
    <td>U</td>
    <td>update_term_meta( <span class=”MathJax_Preview”></span><span class=”MathJax” id=”MathJax-Element-4-Frame” role=”textbox” aria-readonly=”true”><nobr><span class=”math” id=”MathJax-Span-34″ style=”width: 3.544em; display: inline-block;”><span style=”display: inline-block; position: relative; width: 2.919em; height: 0px; font-size: 120%;”><span style=”position: absolute; clip: rect(1.669em 1000em 2.815em -0.414em); top: -2.497em; left: 0.003em;”><span class=”mrow” id=”MathJax-Span-35″><span class=”mi” id=”MathJax-Span-36″ style=”font-family: STIXGeneral-Italic;”>t<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”mi” id=”MathJax-Span-37″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mi” id=”MathJax-Span-38″ style=”font-family: STIXGeneral-Italic;”>r<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”msubsup” id=”MathJax-Span-39″><span style=”display: inline-block; position: relative; width: 0.992em; height: 0px;”><span style=”position: absolute; clip: rect(1.93em 1000em 2.659em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mi” id=”MathJax-Span-40″ style=”font-family: STIXGeneral-Italic;”>m</span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span><span style=”position: absolute; top: -2.081em; left: 0.732em;”><span class=”mi” id=”MathJax-Span-41″ style=”font-size: 70.7%; font-family: STIXGeneral-Italic;”>i</span><span style=”display: inline-block; width: 0px; height: 2.242em;”></span></span></span></span><span class=”mi” id=”MathJax-Span-42″ style=”font-family: STIXGeneral-Italic;”>d<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.055em;”></span></span><span class=”mo” id=”MathJax-Span-43″ style=”font-family: STIXGeneral-Regular;”>,</span></span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span></span><span style=”border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.128em; vertical-align: -0.247em;”></span></span></nobr></span><script type=”math/tex” id=”MathJax-Element-4″>term_id, </script>meta_key, <span class=”MathJax_Preview”></span><span class=”MathJax” id=”MathJax-Element-5-Frame” role=”textbox” aria-readonly=”true”><nobr><span class=”math” id=”MathJax-Span-44″ style=”width: 5.263em; display: inline-block;”><span style=”display: inline-block; position: relative; width: 4.378em; height: 0px; font-size: 120%;”><span style=”position: absolute; clip: rect(1.669em 1000em 2.815em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mrow” id=”MathJax-Span-45″><span class=”mi” id=”MathJax-Span-46″ style=”font-family: STIXGeneral-Italic;”>m</span><span class=”mi” id=”MathJax-Span-47″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mi” id=”MathJax-Span-48″ style=”font-family: STIXGeneral-Italic;”>t<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”msubsup” id=”MathJax-Span-49″><span style=”display: inline-block; position: relative; width: 0.94em; height: 0px;”><span style=”position: absolute; clip: rect(1.93em 1000em 2.659em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mi” id=”MathJax-Span-50″ style=”font-family: STIXGeneral-Italic;”>a</span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span><span style=”position: absolute; top: -2.081em; left: 0.523em;”><span class=”mi” id=”MathJax-Span-51″ style=”font-size: 70.7%; font-family: STIXGeneral-Italic;”>v</span><span style=”display: inline-block; width: 0px; height: 2.242em;”></span></span></span></span><span class=”mi” id=”MathJax-Span-52″ style=”font-family: STIXGeneral-Italic;”>a</span><span class=”mi” id=”MathJax-Span-53″ style=”font-family: STIXGeneral-Italic;”>l<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”mi” id=”MathJax-Span-54″ style=”font-family: STIXGeneral-Italic;”>u</span><span class=”mi” id=”MathJax-Span-55″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mo” id=”MathJax-Span-56″ style=”font-family: STIXGeneral-Regular;”>,</span></span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span></span><span style=”border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.128em; vertical-align: -0.247em;”></span></span></nobr></span><script type=”math/tex” id=”MathJax-Element-5″>meta_value, </script>prev_value )</td>
    </tr>
    <tr>
    <td>D</td>
    <td>delete_term_meta( <span class=”MathJax_Preview”></span><span class=”MathJax” id=”MathJax-Element-6-Frame” role=”textbox” aria-readonly=”true”><nobr><span class=”math” id=”MathJax-Span-57″ style=”width: 3.544em; display: inline-block;”><span style=”display: inline-block; position: relative; width: 2.919em; height: 0px; font-size: 120%;”><span style=”position: absolute; clip: rect(1.669em 1000em 2.815em -0.414em); top: -2.497em; left: 0.003em;”><span class=”mrow” id=”MathJax-Span-58″><span class=”mi” id=”MathJax-Span-59″ style=”font-family: STIXGeneral-Italic;”>t<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”mi” id=”MathJax-Span-60″ style=”font-family: STIXGeneral-Italic;”>e</span><span class=”mi” id=”MathJax-Span-61″ style=”font-family: STIXGeneral-Italic;”>r<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.003em;”></span></span><span class=”msubsup” id=”MathJax-Span-62″><span style=”display: inline-block; position: relative; width: 0.992em; height: 0px;”><span style=”position: absolute; clip: rect(1.93em 1000em 2.659em -0.466em); top: -2.497em; left: 0.003em;”><span class=”mi” id=”MathJax-Span-63″ style=”font-family: STIXGeneral-Italic;”>m</span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span><span style=”position: absolute; top: -2.081em; left: 0.732em;”><span class=”mi” id=”MathJax-Span-64″ style=”font-size: 70.7%; font-family: STIXGeneral-Italic;”>i</span><span style=”display: inline-block; width: 0px; height: 2.242em;”></span></span></span></span><span class=”mi” id=”MathJax-Span-65″ style=”font-family: STIXGeneral-Italic;”>d<span style=”display: inline-block; overflow: hidden; height: 1px; width: 0.055em;”></span></span><span class=”mo” id=”MathJax-Span-66″ style=”font-family: STIXGeneral-Regular;”>,</span></span><span style=”display: inline-block; width: 0px; height: 2.503em;”></span></span></span><span style=”border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.128em; vertical-align: -0.247em;”></span></span></nobr></span><script type=”math/tex” id=”MathJax-Element-6″>term_id, </script>meta_key, $meta_value )</td>
    </tr>
    </tbody>
    </table>

  • トピック「タームやカテゴリーにPVを書き込みたい」には新たに返信することはできません。