Cuir Leathanach Naisc le do Theimpléad WordPress

liosta leabharmharcanna wordpress

Bhíomar ag obair ar shuíomh cliant inniu chun Athbhreithniú Clúdaigh iPad liosta leis an suíomh. Seachas iad uile a liostáil amach ar leathanach nó i bpost, shocraigh muid a leathanach teimpléid that pulled one link category from WordPress' build in Naisc alt, ar a dtugtar “Léirmheasanna”.

An WordPress API tá feidhm ionsuite aige cheana féin, ar a dtugtar 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 fheidhm.

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', 'category_name' => 'Léirmheasanna')); // Lúb trí gach leabharmharc agus taispeáin an foreach aschuir formáidithe ($ naisc mar $ nasc) {macalla ' link_url.'" target="_blank">'; link_url.'" target="_blank">macalla $ link-> link_name. ' - '; macalla $ link-> link_description; macalla ' '; }?>

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 ár liosta cliant, áit a rinneamar comhtháthú freisin íomhánna mionsamhlacha beo de na suíomhanna. Is féidir leat fiú a nofollow tags.

Cad é do bharúil?

Úsáideann an suíomh seo Akismet chun spam a laghdú. Foghlaim conas a dhéantar próiseáil ar do chuid tráchta.