WordPress: E paʻi i nā mea e hiki mai ana ma ke ʻano he hanana e hiki mai ana

WordPress

Ua kūkulu mākou i kahi pūnaewele micro-WordPress no ʻO ka blog blog ʻana no Dummies a makemake e loaʻa kahi ʻāpana kahi mākou i hōʻike ai i nā hanana e hiki mai ana ma ka ʻaoʻao ʻaoʻao haʻahaʻa. Maʻalahi loa ka hopena e hana ai i kēia a kūkulu pololei ʻia i WordPress. Ma loko o kāu kumuhana, hiki iā ʻoe ke hoʻohui i kahi loop e nīnau wale a hōʻike i nā pou e hiki mai ana no kahi mahele kikoʻī e hoʻohana wale ʻia no nā hanana e hiki mai ana.

<?php query_posts('order=ASC&popoki = 3 & post_status = wā e hiki mai, paʻi '); inā (have_posts ()): ʻoiai (have_posts ()): the_post (); inā (strtotime (get_the_time ("F jS Y"))> manawa ()): hoʻomau; ʻē aʻe: echo $ post-> id; ?>

Hoʻonoho ʻia ka hana query_posts ma mua o ka loop loop e palena i nā pou i paʻi ʻia i ka nīnau i hoʻohana ʻia. ʻOiai ʻo kēia nā pou blog i hoʻonohonoho ʻia (ma ka lā hanana), ʻaʻole pono ʻoe e hopohopo e pili ana i ka hōʻike ʻia ʻana i kāu blog kumu i kāu anakuhi. Hiki paha iā ʻoe ke hūnā i nā mahele mai kāu papa inoa papa inoa. Hiki i kēia ke hoʻokō ʻia e ka hoʻoponopono ʻana i kāu papa inoa mahele i kāu anakuhi WordPress me ka hoʻohana ʻana i ka koho hemo:


Ua hoʻohui pū mākou i nā metadata no ka pou e hōʻike i kahi no ka hanana. Hoʻopau kēia i ka hoʻohana ʻana i ka ʻaoʻao Customs Fields o WordPress. E kikokiko wale i kahi no ka inoa kahua a me kāu wahi no ka waiwai… a laila e kiʻi i kahi no ka hōʻike e hoʻohana ana i ke kauoha get_post_meta ma luna.

ʻOluʻolu ka pūnaewele i hopena, me kahi hoʻolālā ʻokoʻa a me ka hoʻolālā i loaʻa nā mea āpau e pono ai e hoʻolaha i ka puke.
ʻ Tipslelo Aʻoaʻo Blogging Corporate.png

3 Comments

  1. 1

    Ua kūkulu mākou i kahi hānai maʻamau me nā hanana e hiki mai ana i kau ʻia a hoʻololi i ka hanauna sitemap XML e paʻi i nā pou e hiki mai ana. Inā ʻoe e hoʻohana nei i ka XML Sitemap Generator o Arne Brachenwald, hiki ke hōʻano hou ʻia ka laina 1747 o sitemap-core.php i $where.=” (post_status IN ('publish','future') AND (post_type = 'post' OR post_type = ”)) “;

  2. 2

Pehea kou manaʻo?

Ke hoʻohana nei kēia pūnaewele i ka Akismet e ho'ēmi i ka spam. E aʻo pehea e hanaʻia ai kāuʻikeʻikepili.