Sanya Shafukan Shafuka zuwa Shafin WordPress

alamun shafi jerin kalmomin rubutu

Muna aiki a kan rukunin abokin ciniki yau don ƙara wani Binciken Murfin iPad jerin zuwa shafin. Maimakon jera su duka a cikin shafi ko matsayi, mun yanke shawarar gina shafin samfuri that pulled one link category from WordPress' build in links sashe, wanda ake kira "Reviews".

A WordPress API an riga an gina shi cikin aiki, wanda ake kira Alamar wp_list_, 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 samu_lambobi aiki.

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:

'suna', 'oda' => 'ASC', 'category_name' => 'Ra'ayoyin')); // Madauki ta kowane alamar kuma nuna tsararren fitarwa mai gabatarwa ($ links as $ link) {echo ' link_url.'" target="_blank">'; link_url.'" target="_blank">amsa kuwwa $ link-> link_name. ' - '; amsa kuwwa $ link-> link_description; amsa kuwwa ' '; }?>

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 jerin abokan cinikinmu, inda kuma muka hade kai tsaye hotunan hotuna na shafukan. Har ma kuna iya ƙara a balaga tags.

Me kuke tunani?

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.