Loading...

Jak udelat functions.php friendly pro child themes

Sablony vyvijime dlouho a za tu dobu se snazime nas kod konstantne zlepsovat. Nejvetsi impuls pro zlepseni ovsem nastal, kdyz jsme krom sablon zacali take jako firma delat webove prezentaci na miru. Pouzivali jsme sablony nejen nase, ale i cizi a diky teto zkusenosti se nam povedlo uvedomit si, co maji ostatni sablony za nedostatky a co jako developer potrebujete, aby jste vytvorili super produkt pro klienta. Naprostym zakladem je mit kvalitni functions.php soubor, pokud mozno okomentovany. Ja se sice dokazi v kodu jako developer zorientovat pekelne rychle, protoze me WP poslednich 7 let zivi, ale dulezite je, aby to zvladli i ostatni.

Proto jsme ve FRESHFACE rozdelili soubor functions.php na nekolik casti:

  • Inicializace frameworku – povinna cast ve vsech nasich sablonach, kde dochazi ke kooperaci s framework pluginem. Uzivatel by ji urcite nemel menit.
  • Inkludovani CSS a JS – kazda sablona ma zakladni CSS a JS soubory, ktere je potreba includovat. Buyer casto potrebuje neco z nich zmenit, a proto je dobre mit vse po ruce hned na zacatku souboru
  • Inicializace frameworku – nemel menit.
  • Customizvatelne veci uzivatelem – to co vetsina lidi editouje, napriklad odesilani ajax contact formu, widgety, registrace sidebaru, woo commerce a dalsi
  • Core Veci – tyto by uzivatel nemel za zadnou cenu menit.

WordPress Menu Items Limit

I’m not sure if its well known, but we found few articles about this topic – If you are using WordPress and have like bunch of navigation menus, there is a big chance, that your will run to the limit, where you cannot add any more navigation items. Actually, your WordPress navigation menu items might be lost after save, out of the blue sky.

How to make links in your WordPress Twitter widget clickable

When Twitter changed API to 2.0 and disabled the old one, we adapted to it. But with the adaptation comes small problem – you can gain the tweets, but only as a plain text, without already prepared and existing nice links to your profiles, hashtags and linkify the content of the twitter widget itself. I made a screenshots for better imagining this issue:

tweet with links

Tweet with links