44 questions linked to/from Best collection of code for your 'functions.php' file
How to display SQL query that ran in query?
I have come across a function before that displayed the exact SQL code that was used. In a loop for example, but can't remember. Can anybody tell me that function?
Where to put my code: plugin or functions.php?
Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php? There are many cases and many debates about that topic, mostly because there are ...
Refactoring Wordpress to improve memory performance [closed]
I had a close look at Wordpress memory consumption. On my site, it seems that for each page hit 20MB of RAM gets allocated, just to prepare comfy environment for all the plugins to run in. I plotted ...
Best collection of code for your .htaccess file [closed]
We have the Best Collection of Code for your functions.php file thread, so I thought that it might be useful to create a thread for our .htaccess files. AND PLEASE REMEMBER TO ADD ANY OF YOUR OWN ...
I've already added my scripts, but I wanted to know the preferred way. I just put a <script> tag directly in the header.php of my template. Is there a preferred method of inserting external or ...
Loading scripts only if a particular shortcode or widget is present
I needed a way to filter a page/posts content before it was loaded so I could add scripts to the header if a specific shortcode was present. After much searching I came across this on http://...
Add Google Analytics manually, or use a plug-in?
Our situation is that we only dabble with Wordpress, however one of our Wordpress customers wishes to add Google Analytics to his site. I'm assuming we can do this manually, relatively easily. And ...
Who are the most trusted plugin developers? [closed]
Note: Please vote on the question, and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer. There are so many plugins out there. Whose plugins can ...
Hide other users' posts in admin panel
I intended to run a multi-author site, I don't want the posts from other authors to be shown in /wp-admin/edit.php page. I managed solve this problem by the codes from this thread. The code is like ...
How to control manual excerpt length?
I have a website in which I need to control the displayed excerpt length. Some of the posts might have manual excerpt so I can't use the excerpt_length filter. I can, of course, use some kind of ...
Adding Custom Post Type Counts to the Dashboard
The dashboard conveniently tells me how many posts, pages, and comments I have. I would like it to tell me how many articles, videos and cartoons I have too (three custom post types registered with my ...
Why is home (a lot) slower than other pages?
I'm trying to tune a wordpress website which suffers slow loading times, and I found out that the home page seems to take a lot more time to load. It's not due to content because I'm just considering ...
How would I create a shortcode to display a custom post within a page or regular post?
I would like to create a shortcode that will extract information for a custom post, and display it within a Page or regular Post. Specific use case: I have a custom post type "Film" for a film ...
What are the pros and cons of using a custom front-end to retrieve content from a Wordpress back-end
I've been building wordpress sites for a few years now and have noticed a few things that bother me. 1. It's fairly slow (awful blanket statement, I apologize) My initial desire to create a ...
How can i increase the login expiration length?
As the title says, how can i increase the login expiration period? Running a local install it's a little annoying to have to keep logging in, despite the fact i have the browser remember login ...