background preloader

WordPress functions.php Snippets

WordPress functions.php Snippets

http://www.wpfunction.me/

Related:  snippetsCoding - PHP & ...ProgrammationTrucs & Astuces

Function Reference/load child theme textdomain This article is a ROUGH DRAFT. The author is still working on this document, so please do not edit this without the author's permission. The content within this article may not yet be verified or valid. 5 Ways to Increase the PHP Memory Limit in WordPress In case you are a blogger & you use WordPress; on some hosts you’ll notice a ‘Fatal Error : Memory Size Exhausted’ when you install a lot of plugins, upgrade to the latest WordPress version or even you’ll find an error in your Dashboard widget which prevents them from loading fully. In case you want to reduce your plugins, then you can take a look at the Top 10 WordPress Plugins I use on DailyBlogging. Such types of problems arise because the PHP Memory Limit of your Host is pretty less than what the process requires for performing it’s functions.

Développer un thème : règles de base Languages: বাংলা • English • Español • 日本語 • 한국어 • Português do Brasil • Русский • 中文(简体) • 中文(繁體) • (Add your language) This article is about developing WordPress Themes. If you wish to learn more about how to install and use Themes, review Using Themes. Create Wordpress Post Custom Meta Boxes At the bottom of my posts you will sometimes see a couple of embedded tweets near the comments section. Many people have asked me how this appears on the site and if it's an automatic process. Well it's not an automatic process, I manually add these to the post. I wanted a way of highlighting tweets that stand out to me on Twitter, if this was an automatic process all tweets would come through, I just wanted a selected few to be displayed. But these tweets have nothing to do with the content but they are related to the post.

The WordPress Coding Standards: An Introduction The WordPress Coding Standards: An Introduction When it comes to building WordPress-based products, we’re somewhat cursed (or blessed, depending on how you see it), with a double-edged sword: Because WordPress is written in PHP, it’s relatively easy to get WordPress – or the project itself – to do whatever it is we want to do all the while avoiding best practices. But this raises the question: What’s the point of an API or formal coding standards if we’re simply going to ignore them? We’ve written quite a bit about the WordPress APIs in previous articles, and we’ve touched on the WordPress Coding Standards, but we’ve never really taken a deep dive into the coding standards, understanding each aspect of them, and why they matter. So in this series, we’re going to be doing just that.

PHP 7: 10 Things You Need to Know Are you a web developer or a website owner? Do your sites run on PHP-enabled CMS such as WordPress, Drupal, Joomla or Magento? Then I have good news for you: the feature-complete beta of the new PHP 7 was recently released. 25+ HTML5 and CSS3 Sliders Free To Use - DesignGrapher.Com Creating or designing a unique and different website is very challenging. To make your job easier, you can select HTML5 and CSS3 sliders that are ready to. There are many HTML5 and CSS3 sliders available for free downloads on the internet. You can download them depending on your needs and tastes. Most of these HTML5 and CSS3 sliders are responsive and hence you can use them with ease without any knowledge of programming. In fact, once you download the HTML5 and CSS3 sliders, within minutes you will understand how to use; you do not have to be a technical geek at all!

Open Source Tools and Scripts for WordPress Developers There have been a number of cool inventions and tools released over the past few years. Frontend web developers are enjoying the control granted with open source plugins, scripts, libraries, and other similar release packs. WordPress is a great CMS because it provides a large collection of free themes and plugins to build around. And the userbase has been growing like crazy for years. I feel there are not enough resources out there for truly dynamic WordPress developers. In this article I want to showcase a number of tools and resources which are perfect for WP devs.

Collection Of WordPress Cheatsheets In this post you will find the biggest collection of WordPress cheat sheets. Cheat sheet is a reference tool that provides simple, brief instructions for accomplishing a specific task. Hope you will like the list. Don’t forget to subscribe to the feed if you would like to be informed for the latest posts. Issues with multiple loops and sticky posts on index.php I've had a look through the codex at the documentation for the loop and for sticky posts and I can't quite figure out what my issue is. What I'm trying to accomplish is on the FIRST page of index.php, I want to show ONE sticky post IF there is one, then the first post formatted with class="first-post", then the remaining posts formatted with class="even" or class="odd". For subsequent pages using index.php, I just want to show class="odd" or class="even". The even/odd and first-post stuff is working fine EXCEPT if I have a sticky post published.

10 Excellent HTML5, CSS3 & JS Tuts + Demos CSS Navigation Bar A sublime hover effect that is crying to be utilized. 3D Cube Rotate Menu A sleek 3D cube rotation effect on each link in the menu. WordPress AJAX Comments There are many functionalities on the web that were just begging to be AJAXified. Whether it be voting on a poll or simply commenting on a blog post, there's really no reason to reload an entire page for something so simple. This blog has featured AJAX comments in WordPress for years, but only recently did I find the most optimized way to process those comments. Here's how to handle the WordPress PHP side of AJAX comment systems. Add the following function with your theme's function.php file:

Function Reference/wp list pages Function Reference/wp list pages Languages: 中文(简体) • English • 日本語 • (Add your language) Description Displays a list of WordPress Pages as links. It is often used to customize the Sidebar or Header, but may be used in other Templates as well. 4 Ways to Loop with WordPress At the heart of the WordPress theme template is the venerable WordPress loop. When you're looking at your index.php file, for example, the loop is the part that typically begins with if(have_posts()) and contains all the tags and markup used to generate the page. The default loop works perfectly well for most single-loop themes, but for more advanced designs with stuff like multiple and custom loops, more looping power is needed. Fortunately, WordPress provides plenty of flexibility with four ways to loop: Each of these looping methods is useful in a variety of situations.

Related: