Mira Kugadziridza Makore muBhizinesi pane Yako WordPress Siti neiyi Shortcode

Makore muBhizinesi Shortcode yeWordPress

Chimwe chezvinhu zvikuru pamusoro peiyo WordPress kushanduka kwekuvaka mapfupi makodhi Shortcodes zviri chaizvo kutsiva tambo iwe dzaunogona kuisa mune zvako zvemukati zvinoshandura zvine simba zvemukati.

Ndiri kubatsira mutengi svondo rino kwavari kutora chimwe chezvigadzirwa zvavo uye kuchichikungurudzira muchinda nyowani. Iyo saiti mazana emapeji uye yanga iri basa rakaomarara. Sezvo isu tanga tichishanda pane yakadomwa runyorwa rwezvinhu, imwe yakabuda ndeyekuti paive nemakumi mazhinji eblog mablog, mapeji, uye mafoni-kune-chiito aitaura kune makore ekambani mune bhizinesi.

Mamwe mapeji aive ne13, mamwe gumi neshanu, mamwe aive akarurama pa15… zvese zvinoenderana nekuti zvakanyorwa riinhi. Iyi ndeimwe yeaya asina kufanira edhisheni yekuda kuti iyo shortcode igone kubata zvakakwana.

Zvese zvatinoda kuti tiite kunyoresa ipfupi kodhi inotora gore razvino uye kurikonzera kubva pagore rakagadzwa kambani. Tinogona kunyoresa ipfupi kodhi uye nekuisa basa mukati meiyo saiti theme functions.php faira:

function YIB_shortcode() {
   $start_year = '2003';
   $current_year = date('Y');
   $displayed_year = $current_year - $start_year;
   $years = $displayed_year;
   return $years;
}
add_shortcode('YIB', 'YIB_shortcode');

Zvinoitwa nebasa iri kubvisa gore razvino kubva muna 2003 kuti riuye nenhamba yakakodzera yemakore iyo kambani yanga iri mubhizinesi.

Nekudaro, kana ini ndichishuva kunyora kuti yakange yave nguva yakareba sei kambani iri mubhizinesi mukati mezvinoitika zvesaiti, ini ndinongonyora:

Our company has been in business for [YIB]+ years!

Ehe, iwe unogona kuwana zvakanyanya kuomarara nerudzi urwu rweiyo shortcode ... unogona kushandisa HTML, mifananidzo, CSS, nezvimwe asi uyu unongova muenzaniso wakapusa kungoona kuti saiti yako yatove nemazvo!

Unofungei?

Nzvimbo iyi inoshandisa Akismet kuderedza spam. Dzidza kuti sei deta yako inoshandiswa.