Ungakuhlanganisa Kanjani Okuthunyelwe Nezinhlobo Zokuthunyelwe Ngokwezifiso Kumibuzo Ye-WordPress kanye Nokuphakelayo kwe-RSS

I-WordPress noma i-Elementor Hlanganisa noma Hlanganisa Okuthunyelwe Nezinhlobo Zokuthunyelwe Ngokwezifiso Embuzweni

Esinye sezici ezimangalisayo ze-WordPress yikhono lokwakha Izinhlobo Zokuthumela Ngokwezifiso. Lokhu kuvumelana nezimo kuyamangalisa… njengoba izinhlobo zokuthunyelwe ngokwezifiso zingasetshenziswa ukuze ibhizinisi lihlele ezinye izinhlobo zokuthunyelwe njengemicimbi, izindawo, Imibuzo Evame Ukubuzwa, izinto zephothifoliyo kalula. Ungakha ama-taxonomies angokwezifiso, izinkambu ezengeziwe zemethadatha, ngisho nezifanekiso zangokwezifiso ukuze uzibonise.

Esizeni sethu ku Highbridge, sinohlobo lokuthunyelwe okungokwezifiso olusethelwe amaphrojekthi ngaphezu kwebhulogi yethu lapho sabelana ngezindaba zenkampani. Ngokuba nohlobo lokuthunyelwe ngokwezifiso, siyakwazi ukuvumelanisa amaphrojekthi emakhasini ethu wamakhono... ngakho-ke uma ubuka ewethu Izinsizakalo ze-WordPress, amaphrojekthi esisebenze kuwo ahlobene ne-WordPress azoboniswa ngokuzenzakalelayo. Ngisebenza kanzima ngizama ukubhala wonke amaphrojekthi ethu ukuze abavakashi bethu babone imisebenzi eminingi esiyenzela izinkampani.

Ukuhlanganisa Okuthunyelwe Nezinhlobo Zokuthunyelwe Ngokwezifiso

Ikhasi lethu lasekhaya selivele libanzi, ngakho-ke angizange ngifune ukuthi ngakhe isigaba samabhulogi ethu KANYE nesigaba samaphrojekthi ethu akamuva. Ngifuna ukuhlanganisa kokubili okuthunyelwe namaphrojekthi ekuphumeni okufanayo ngisebenzisa umakhi wethu wesifanekiso, Elementor. I-Elementor ayinaso isixhumi esibonakalayo sokuhlanganisa noma ukuhlanganisa okuthunyelwe nezinhlobo zokuthunyelwe ngokwezifiso, kodwa kulula kakhulu ukwenza lokhu ngokwakho!

Ngaphakathi kwekhasi letimu yengane yakho elithi function.php, nasi isibonelo sendlela yokuhlanganisa kokubili:

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' );

Isihlungi se-pre_get_posts sikwenza ukwazi ukubuyekeza umbuzo futhi uwuhlele ukuze uthole kokubili okuthunyelwe kwakho kanye project uhlobo lokuthunyelwe ngokwezifiso. Kunjalo, lapho ubhala ikhodi yakho uzodinga ukubuyekeza uhlobo(izinhlobo) zokuthunyelwe ngokwezifiso zakho zibe umhlangano wangempela wamagama wakho.

Ukuhlanganisa Okuthunyelwe Nezinhlobo Zokuthunyelwe Ngokwezifiso Kokuphakelayo Kwakho

Futhi nginesayithi elishicilela ngokuzenzakalelayo ezinkundleni zokuxhumana ngokusebenzisa okuphakelayo kwayo... ngakho bengifuna ukusebenzisa umbuzo ofanayo ukusetha okuphakelayo kwe-RSS. Ukwenza lokhu, bekumele ngengeze isitatimende NOMA futhi ngifake i_iyondliwa.

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' );

Ukuhlanganisa Okuthunyelwe Nezinhlobo Zokuthunyelwe Ngokwezifiso ku-Elementor

Enye inothi… Elementor inesici esihle kakhulu lapho ungaqamba futhi ulondoloze umbuzo kusayithi lakho. Kulokhu, ngakha umbuzo obizwa ngezindaba-amaphrojekthi futhi ngingawubiza ngisuka kusixhumi esibonakalayo somsebenzisi we-Elementor esigabeni Sombuzo Wokuthunyelwe.

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

Nansi indlela ebukeka ngayo kusixhumi esibonakalayo somsebenzisi we-Elementor:

umbuzo wokuthunyelwe kwe-elementor

Ukudalula: Ngisebenzisa eyami Elementor isixhumanisi sokusebenzisana kulesi sihloko.