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 wannan ya jawo nau'in mahada guda ɗaya daga WordPress 'gina ciki links sashe, wanda ake kira "Reviews".

A WordPress API an riga an gina shi cikin aiki, wanda ake kira Alamar wp_list_, wannan yana tsara alamun shafi a cikin tsarin jeri mara tsari. Matsalar ita ce ba za ku iya ƙara manufa zuwa alamar anga ba don buɗe hanyoyin a cikin sabon shafin ko taga. Don haka… kuna buƙatar rubuta madafinku don yin hakan. Kuna iya yin wannan tare da samu_lambobi aiki.

Da farko, zan ɗauki hanyoyin haɗi cikin jeri kuma in umurce su da hawa, da suna, kai tsaye daga rukunin mahaɗan Ra'ayoyin. Sannan na fitar da HTML don samar da jerin:

'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 ' '; }?>

Yanzu zaku iya samarda jadawalin duk yadda kuka so da kowane salo da kuke so. Mun dauke shi matuka a shafin kamfanin mu don yin bita 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.