Function: WordPress functions

99 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 […]

Removing the title links in post lists

The Customizr theme displays by default your post titles as links pointing to the single post. Here’s a simple way (using some javascript) to remove those links if you ever need to. Paste the following code in your functions.php : add_action(‘wp_head’ , ‘remove_post_list_title_links’); function remove_post_list_title_links() { ?> <script id=”remove-links-in-title” type=”text/javascript”> […]

Featuring pages on another page / post than home

Let’s say you’ve setup three beautiful featured pages on your home page. Now you might want to display this block of featured pages in another post or page of your website. This snippet will show you how to do it.   Note : Customizr-Pro and Featured Pages Unlimited users should replace `__get_option` with […]

Add a specific page or post content in another post or page

Following this discussion in the Customizr theme support forum, here’s a simple piece of code that will allow you to add any post or page before your post or page content in the Customizr WordPress theme. The following snippet will add the content on your front page and before the featured […]

removing-text-below-comment

Removing the allowed HTML tags and attributes note after the comment form in WordPress

Those last days I have had a recurrring request on how to remove the text describing the HTML tags allowed in comments : “You may use these HTML tags and attributes …“.     This is pretty simple to remove this note in WordPress since it is declared in an array assigned to a […]

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 […]

Add Scrollspy to the Navbar

If you need to add Scrollspy to the Navbar: Where to copy/paste this code? We strongly recommend you create a child theme. Everything you need to know about creating a child theme with Customizr here. /* START OF Add Scrollspy to the Navbar (Needs additional php code in Child Theme […]