The best-practices tag has no wiki summary.
0
votes
0answers
20 views
With a plugin, or without a plugin, that is the question [closed]
I've been reading a lot of posts on wordpress.stackexchange.com lately. Heres a very common interaction between original poster(OP) and responder(R).
OP: Hey, I want to be able to do X on my site. Im ...
1
vote
3answers
94 views
How to break down importing of feeds
I am attempting to update a large array of feeds into WordPress, using fetch_feeds. As can be expected, when going over 50 feeds the server is starting to time out. I would still like to update the ...
1
vote
2answers
26 views
apply filters only to specific post listing without check the url parameters
I have made a custom post type named as: slider, in my plugin class, I am adding a filter
which calls the method remove_row_action that unsets view links from actions
...
0
votes
0answers
36 views
Multiple slider administration - best practice
From what I've seen there is common for a theme developer to make multiple slider plugins available in a theme.
I intend to add the capability of including a slider on the home page of my theme.
I ...
0
votes
2answers
46 views
What are the main parts of a Wordpress Template?
This may sound like a stupid question, but...
What are the main parts of a Wordpress template, and which parts are mandatory and which parts are optional?
So far I am aware of:
Posts (mandatory)
...
1
vote
1answer
50 views
What's the best way to implement AJAX in WordPress?
WordPress has a framework in place for handling AJAX which is well documented here: http://codex.wordpress.org/AJAX_in_Plugins
My concern with this is that every time you execute an AJAX query, (even ...
1
vote
0answers
38 views
What would be the correct way to manage a multiple locale site with Wordpress [closed]
We are a professional company with lots of big clients and have adopted Wordpress 2 years ago to build professionnal grade websites. Being locate in a multiple language country, we have to make our ...
0
votes
2answers
58 views
REQUIRED: Could not find wp_link_pages. See: wp_link_pages by Theme Checker
I have run my theme through WordPress theme checker to see if it can be submitted to WordPress.org. I encountered this error:
REQUIRED: Could not find wp_link_pages. See: wp_link_pages
But this ...
13
votes
2answers
244 views
Is it ever okay to include inline CSS in plugins?
Normally in a plugin I would add styles using wp_enqueue_style. However, I am currently creating a plugin that only needs a few lines of CSS and I am wondering if it might be better to serve the ...
12
votes
4answers
548 views
Why have <?php and ?> on every line
I've seen this convention pretty much everywhere, and, at times, it comes close to driving me nuts:
<?php //The loop ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php ...
1
vote
1answer
52 views
Where should I use get_option in a plugin
I am working on creating a plugin to help me with future development projects. I want to make sure what I am using best practices when I write it. My question is about the use of get_option in my ...
1
vote
2answers
34 views
Translating long texts with html formatting
I was wondering what is the best way to translate some longer texts with html formatting. There was a couple of solutions I came across, but did not know what would be the best one.
Writing a couple ...
3
votes
1answer
92 views
Optimize shortcode callbacks
I created a plugin to add some shortcodes in my WordPress site. But I'm a PHP newbie, so I believe it may have some errors or ways to optimize it.
It's working fine, and apparently there are no ...
4
votes
3answers
113 views
Best way to abort plugin in case of insufficient PHP version?
You write a plugin which requires PHP 5.1. Someone tries to install it on a server with PHP 4. How do you deal with that in a safe and user-friendly manner?
2
votes
1answer
638 views
get_template_directory() vs bloginfo( 'template_directory' ) vs TEMPLATEPATH
I was reading this article: Common WordPress Development Mistakes and How to Fix Them, and in it, they author says:
Getting the theme location: If you are using TEMPLATEPATH or bloginfo(
...