Linked Questions

44
votes
8answers
4k views

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 ...
47
votes
7answers
8k views

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 ...
30
votes
5answers
51k views

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? Cheers
42
votes
2answers
18k views

What is the preferred way to add custom javascript files to the site?

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 ...
29
votes
4answers
6k views

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 ...
17
votes
4answers
710 views

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 ...
9
votes
3answers
8k views

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 ...
15
votes
4answers
972 views

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 ...
6
votes
4answers
2k views

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 ...
5
votes
5answers
994 views

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 ...
4
votes
4answers
709 views

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 ...
3
votes
5answers
7k views

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 ...
2
votes
3answers
995 views

Optimal solution to develop a wordpress theme?

What i was doing previously, are as follows - I copy the wordpress base theme (like twentytwelve in wordpress 3.5) Rename the folder and converted index.html of my HTML to index.php for wordpress ...
4
votes
1answer
2k views

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 ...
0
votes
1answer
6k views

How can I customize “Pages” admin (edit.php) and “Edit Page” admin (post.php) for bulk edit of custom content type?

I think its probably easier than I think to do this, but currently its beyond me. If there are any plugins out there I'd prefer to start there rather than develop from scratch, but I'll do what I have ...
1
vote
2answers
7k views

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 ...
2
votes
3answers
1k views

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 ...
4
votes
1answer
1k views

Add custom meta to nav menu items

I need to attach meta data to every menu item, with a key 'foo'. Is it possible to do that, without editing core WP? A quick look at the nav-menu files showed that no hooks exist near the place I ...
1
vote
2answers
1k views

Display text if current user has written 1 or more posts in a custom post type

I am trying to display different things to new users that have not created a post versus users who have created a post. I tried this, but it did not work for custom post types (only normal posts) ...
4
votes
1answer
1k views

Help to condense/optimize some working code

WordPress by default shows ALL posts to users who are Authors. I wanted Authors to only be able to see their own posts so I came up with the following code which works well. Any suggestions to ...
6
votes
1answer
409 views

Any post install tips after installing Wordpress 3.0.1?

Any post install tips after installing Wordpress 3.0.1? which would be useful for any wordpress installation , where we will use wordpress as a CMS for a website. and blog page will not as a home ...
1
vote
2answers
1k views

Can't change permalink url after hitting 'ok' and 'update'

I am trying to change some of the titles of my posts and their respective permalinks. After I edit the title and permalink and click 'ok', the permalink appears to have changed temporarily. However, ...
2
votes
2answers
1k views

Add custom post types stats to a custom dashboard widget

I have a lot of custom post types and I have them showing in my "Right Now" Dashboard but it's gotten pretty long so I want to separate them to a custom widget within the dash. See example below: ...
0
votes
3answers
522 views

How to implement pagination eg. newer - 3 - 4 - 5 - 6 - 7 - older

How can I implement pagination like shown in the title perhaps something similar to most sites
2
votes
1answer
1k views

How to remove row-actions from pages table?

I've already found out here how to remove the row-actions from the posts table in wordpress admin. Now I'd like to do the same in the pages table. I've looked in the core files but, well, I just don't ...
1
vote
1answer
870 views

moving an admin submenu item to a top-level position

I'm trying to rearrange my admin menu so I can remove the submenus. Basically I'm starting by removing all submenus that I don't want (for instance the ones under the "home" button, or the ones under ...
0
votes
2answers
1k views

Extending the user profile

Is there any way that developing a Wordpress admin panel like this would be possible? http://deanelliott.me/wp-content/uploads/account-backend.jpg My client wants it to be displayed within the ...
0
votes
1answer
808 views

Error after editing functions.php

I was making minor changes to functions.php file but just as I made the changes I got an error, I used FileZilla and undo the function I added but now I am getting the following error, Fatal ...
1
vote
1answer
774 views

Preferred Method of debugging a wordpress SQL calls?

What is your preferred method of debugging Wordpress Applications when writing custom behind-the-scenes SQL calls, etc. ? Coming from a Rails background, I usually tail a log file that displays not ...
0
votes
1answer
579 views

Why my Plugin keeps deactivating automatically?

I have a plugin called 'virtual theme' which I downloaded from the plugin directory, and it works great but i noticed sometimes when there's a change it with other plugins it seems to stop working and ...

15 30 50 per page