Function: php functions

41 posts

customizr-featured-pages

Apply custom or random images to the featured pages

By default in the Customizr theme, the featured pages images use by priority : the page featured images if the featured image is not set, then it uses the first image (ordered by date) attached to this page. (in other words, the first images that has been inserted in the WYSIWYG […]

Customizing the post layout (content, thumbnail) in post lists

Following the excellent javascript snippet from Rocco describing how to change the order of the content and the thumbnail, I’ll describe here the PHP way to hook into the property handling the post layout in post lists (archives, search results, …) and set new custom values, including mobile viewport detection.   By […]

facebook-like-box-in-place-of-customizr-featured-page

Adding a Facebook Like Box in place of a featured page in the Customizr theme

Let’s say you need to feature your Facebook fans on your home page, and display it like one of your featured pages.   I am assuming that you have generated your Facebook code for the lite box here : https://developers.facebook.com/docs/plugins/like-box-for-pages.   Now, here’s a quick snippet to replace one of your […]

Html entities and shortcodes in Featured Pages

Updated : Now compatible with Featured Pages Unlimited and Customizr-Pro Customizr by default doesn’t allow you to have HTML entities or shortcodes in Featured Pages text. This is a wise choice, because the text is trimmed by default to 200 characters. This means that you might risk to have an unclosed tag, which […]

Add new custom socials icons

Since Customizr v3.5+ Since Customizr v3.5, you can add a social link by adding this type of code to your functions.php : Before Customizr v3.5+ 1) Add them! Note : Tumblr now already included in the default Customizr social links. In your child theme functions.php add this simple snippet: add_filter(‘tc_default_socials’, ‘add_new_socials’, […]