wordpress-4.3

    0熱度

    1回答

    如何讓我的菜單在數組中? 使用wp_nav_menu ();,我將得到HTML列表,但我不想HTML標記。我只想要數據。 我發現這個,但是這行是什麼 - $menu_name = 'custom_menu_slug';? $menu_name = 'custom_menu_slug'; // Get the nav menu based on $menu_name (same as 'theme_

    2熱度

    2回答

    如何將我的腳本文件添加到wp_head的頂部? 從這個指南,使用下面的代碼將永遠是我的新的腳本文件添加到最底部: add_action('wp_head','hook_javascript'); function hook_javascript() { $output="<script> alert('Page is loading...'); </script>";

    0熱度

    1回答

    如何從WP標頭中刪除這兩個鏈接? <link rel='https://api.w.org/' href='http://xxx/wp-json/' /> <link rel="canonical" href="http://xxx/" /> 我不知道它們是幹什麼用的。他們對我來說看起來多餘。 可能嗎?

    0熱度

    2回答

    如何手動獲取WP小部件文本? 我嘗試用這個代碼顯示: <?php the_widget('WP_Widget_Text'); ?> 但是我什麼都沒有顯示。 任何具體的我需要通過這個函數?我創建的小部件文本並把它稱爲「跟我學」: 任何想法?

    1熱度

    2回答

    我添加了一個新的工具條 function child_register_sidebar(){ register_sidebar(array( 'name' => 'Social Media (Follow)', 'id' => 'sidebar-follow', 'description' => __('Widgets in this area will

    0熱度

    1回答

    我正在計劃使用WordPress創建交易和優惠券網站。我想用JSON中的數據api自動化它。但是,我將如何將這個api與WordPress的兼容性進行整合,以創建包含每個優惠的自定義字段的新帖子。

    1熱度

    1回答

    如何獲取上傳到我的媒體收藏的圖像 - 通過圖像名稱? 例如,我上傳了一個名爲apple.jpg的圖像,現在我想動態獲取它,而無需對其url進行硬編碼。 所以,我可以做這樣的事情: <img src="<?php echo get_uploaded_image_url_by_name('apple');?>" /> 這可能嗎? 而且更好,如果我能得到這個圖像在陣列中的信息: array(

    0熱度

    1回答

    我在顯示wordpress中的所有評論時遇到問題。評論的總數沒有顯示在正確的地方。 這裏是什麼樣子 我要的是 這裏是我的代碼 '<li class="meta-item meta-total-comments"><i class="fa fa-comments"></i>' . comments_number() . '</li>'