Momwe Mungaphatikizire Zolemba ndi Mitundu Yama Post Mwamakonda Mumafunso a WordPress ndi RSS Feed

WordPress kapena Elementor Phatikizani kapena Phatikizani Zolemba ndi Mitundu Yama Post Pamafunso

Chimodzi mwazinthu zodabwitsa kwambiri za WordPress ndikutha kumanga Mitundu Yaposachedwa. Kusinthasintha uku ndikwabwino kwambiri… monga mitundu yamapositi amtundu amatha kugwiritsidwa ntchito ngati bizinesi kukonza mitundu ina ya zolemba monga zochitika, malo, FAQs, zinthu za mbiri mosavuta. Mutha kupanga ma taxonomies, magawo owonjezera a metadata, komanso ma tempuleti oti muwawonetse.

Patsamba lathu pa Highbridge, tili ndi mtundu wa positi womwe wakhazikitsidwa ntchito kuphatikiza pabulogu yathu komwe tikugawana nkhani zamakampani. Pokhala ndi mtundu wa positi, timatha kugwirizanitsa mapulojekiti omwe ali patsamba lathu… Ntchito za WordPress, mapulojekiti omwe tagwirapo okhudzana ndi WordPress adzawonekera okha. Ndikugwira ntchito molimbika kuyesa kulemba mapulojekiti athu onse kuti obwera patsamba lathu athe kuwona ntchito zomwe timachitira makampani.

Kuphatikiza Zolemba ndi Mitundu Yamapositi Mwamakonda

Tsamba lathu lofikira ndi lalitali kale, kotero sindinkafuna kupanga gawo lazolemba zathu zamabulogu NDI gawo lamapulojekiti athu aposachedwa. Ndikufuna kuphatikiza zolemba ndi ma projekiti kuti zikhale zofanana pogwiritsa ntchito omanga ma template, Zowonjezera. Elementor alibe mawonekedwe ophatikizira kapena kuphatikiza zolemba ndi mitundu yamapositi, koma ndizosavuta kuchita izi nokha!

Mkati mwa tsamba la function.php la mwana wanu, nachi chitsanzo cha momwe mungaphatikizire ziwirizi:

function add_query_news_projects( $query ) {
	if ( is_home() && $query->is_main_query() )
		$query->set( 'post_type', array( 'post', 'project' ) );
	return $query;
}
add_filter( 'pre_get_posts', 'add_query_news_projects' );

Zosefera za pre_get_posts zimakuthandizani kuti musinthe zomwe mukufuna ndikuziyika kuti mupeze positi yanu komanso polojekiti makonda positi mtundu. Zachidziwikire, mukalemba khodi yanu mudzafunika kusintha mtundu wa ma positi kuti ukhale msonkhano wanu weniweni wa mayina.

Kuphatikiza Mapositi ndi Mitundu Yamapositi Mwamakonda muzakudya zanu

Ndilinso ndi tsambalo lomwe limangosindikiza kuma media ochezera kudzera pazakudya zake… kotero ndidafunanso kugwiritsa ntchito funso lomwelo kukhazikitsa RSS feed. Kuti ndichite izi, ndingoyenera kuwonjezera mawu OR ndikuphatikiza ndi_kudyetsa.

function add_query_news_projects( $query ) {
	if ( is_home() && $query->is_main_query() || is_feed() )
		$query->set( 'post_type', array( 'post', 'project' ) );
	return $query;
}
add_filter( 'pre_get_posts', 'add_query_news_projects' );

Kuphatikiza Zolemba ndi Mitundu Yamapositi Mwamakonda mu Elementor

Chidziwitso chimodzi… Zowonjezera ili ndi chinthu chabwino kwambiri chomwe mungatchule ndikusunga funso patsamba lanu. Pankhaniyi, ndikumanga funso lotchedwa nkhani-mapulojekiti ndiyeno nditha kuyitcha kuchokera pa mawonekedwe a ogwiritsa ntchito a Elementor mu gawo la Posts Query.

function my_query_news_projects( $query ) {
	$query->set( 'post_type', array( 'post', 'project' ) );
}
add_action( 'elementor/query/news-projects', 'my_query_news_projects' );

Umu ndi momwe zimawonekera mu mawonekedwe a ogwiritsa ntchito a Elementor:

elementor posts funso

Kuwulula: Ndikugwiritsa ntchito yanga Zowonjezera Othandizana nawo mu nkhaniyi.