Linked Questions

42
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 ...
46
votes
7answers
7k 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 ...
23
votes
5answers
45k 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
40
votes
2answers
16k 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 ...
28
votes
4answers
5k 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
687 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
936 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 ...
4
votes
4answers
683 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 ...
5
votes
6answers
934 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 ...
3
votes
5answers
6k 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
949 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
5k 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
6k 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
967 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
971 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 ...
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 ...
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) ...
6
votes
1answer
406 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
496 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 ...
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
753 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
716 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
811 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 ...
1
vote
2answers
540 views

How do I create custom fields for multiple post types?

I have created multiple post types and now want to create multiple custom fields for each post type. I am not entirely how to but more specifically I believe I am doing something wrong when trying to ...
0
votes
1answer
513 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 ...
0
votes
1answer
503 views

How to convert a plugin into a function

How does one convert a plugin into a function especially when a plugin is so small that it has only one file?
1
vote
2answers
404 views

Store Snapshot created via wordpress to use with lightbox

i know this is a bit of a weird question but its a real time saver so if you got any ideas (even partial) i would really apreacate them :) Ok... so i am using wordpress built in interface to capture ...
1
vote
3answers
174 views

Set of plugins to control the Admin UI

What plugin you would recommend that would give powerful Admin UI options such as change Add Posts menu item to Add Articles, remove Add Media option for certain user roles and not allowing certain ...
0
votes
2answers
224 views

Pagination not working on Custom Page Template

I searched a lot on this but I can't figure out why my code is not working. I published a page with slug "blog" that uses a custom built template "page-blog.php" that I build from editing the ...
1
vote
1answer
157 views

Display SQL that wordpress is running

I am wanting to see the actual SQL that worpress is running to build certain pages, is there a debug method or some other way to outpout this or view it?
2
votes
1answer
158 views

How to update feed only 2-3 times a week (for Feedburner email)?

So many of you know that Feedburner is a great (free) tool for sending out newsletters. The problem is that if you add content everyday, everyday emails will be sent out. I'd like to control on ...
1
vote
2answers
95 views

cross-host benchmarking with wordpress

I am doing some cross-host benchmarking with wordpress, and rather than going to the huge trouble of setting up an identical install of wordpress on each host, a huge investment of time, etc., I want ...
0
votes
1answer
93 views

Determine which template-{slug}.php is being loaded

I am trying to make a personal plugin that does specific things based on what is loaded. In this example, in my action method I want to perform one function if the currently loading page is using the ...
0
votes
1answer
75 views

sql for querying post and their category

I'm trying to query the wordpress database for the post and what category they belong in. Is there a sql query that I can use for this? Thanks,
0
votes
1answer
20 views

Custom blog setting directs blog to index page

In WordPress, I've changed the general settings for my web site to use a static page, pointing the Front page to a custom page called 'Home' which inherits from a template page called tpl-home.php and ...