Rarraba Adadin Labarunku Cikin Saukake

tag tag

Ina neman kayan talla ko wasu lambobi don lale kanun labarai a shafinmu na farko a DK New Media don jin daɗi da yin ado a shafin gida dan kaɗan. Matsalar ita ce ina da taken da aka yi amfani da shi wanda ke da takamaiman filaye don layin alama da bayanin shafin, kuma ban ji daɗin yayyage shi ba don wannan gyare-gyaren.

dknewmedia-labarai

Don yin wannan tare da ƙari da sauye-sauyen taken zai buƙaci amfani da kyakkyawa Ci-gaba Field Field plugin tare da Maimaita Filin Addara - wannan shine yadda zamuyi don abokan ciniki. Don rukunin yanar gizon mu, kodayake, galibi muna ɗaukar gajerun hanyoyi kuma wannan ɗan ƙaramin lambar kodin yana aiki daidai yadda yakamata!

Asali, kawai kuna shigar da kanun labarai da yawa zuwa cikin filin kuma raba su da wasu halaye (Ina amfani da alamar "|"). Sannan zaku iya amfani da aikin fashewar PHP wanda ya sanya dukkan kanun labarai cikin tsari sannan kuma kuyi amfani da aikin shuɗewar PHP don cakuɗa tsari na tsararru, sannan ku nuna sakamakon farko. Kuna nuna sakamako na farko kawai… ta wannan hanyar idan kuna da sakamako ɗaya kawai kuma har yanzu za'a nuna shi da kyau!

A cikin takenmu inda aka nuna kanun labarai, kawai muna maye gurbin rubutun taken da lambar mai zuwa:


Idan kana son samun kwalliya, zaka iya wuce wannan azaman canji na al'ada a cikin Google Analytics kuma a zahiri gwada wane kanun labarai ne suka fi kyau!

Me kuke tunani?

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