Tambihkeun Halaman Tautan kana Témplat WordPress anjeun

daptar tetengger wordpress

Kami damel di situs klien dinten ayeuna pikeun nambihan Tinjauan Panutup iPad daptar ka loka. Daripada daptar aranjeunna sadayana dina halaman atanapi postingan, kami mutuskeun ngawangun halaman témplat that pulled one link category from WordPress' build in Sponsor bagian, disebut "Ulasan".

WordPress API parantos ngagaduhan fungsi anu diwangun, disebat wp_list_bookmarks, that formats the bookmarks out in an unordered list format. The problem is that you can't add a target to the anchor tag to make the links open in a new tab or window. So… you need to write your own loop to make that happen. You can do this with the get_bookmarks fungsi.

First, I'm going to capture the links into an array and order them ascending, by name, directly from the Reviews link category. Then I output the HTML to produce the list:

'name', 'order' => 'ASC', 'kategorya_name' => 'Ulasan')); // Loop through each bookmark and display the formatised output frontach ($ tautan salaku $ tautan) {kamandang ' link_url.'" target="_blank">'; link_url.'" target="_blank">gema $ link-> link_name. ' - '; gema $ link-> link_description; kamandang ' '; }?>

Now you can generate the list however you would like with whatever styling you'd like. We've taken it to the extreme on our corporate site for reviewing daptar klien kami, dimana kami ogé ngahijikeun gambar gambar leutik langsung tina situs. Anjeun malah tiasa nambihan a nofollow tag.

Naon anu anjeun pikirkeun?

Situs migunakeun Akismet pikeun ngurangan spam. Diajar kumaha komentar data anjeun diolah.