Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Themes create the public (front-end) interface for a WordPress site.
8
votes
How to remove "prev, next, shortlink" from wp_head()?
Add these to your list:
<?php
remove_action('wp_head', 'wp_shortlink_wp_head');
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
wp-includes/default-filters.php should be your first sto …
2
votes
Resources for a complete beginner to learn to work professionally with Wordpress
The codex is a good place to start. Looking at the actual code (or via PHP xref) is going to do more for you than reading documentation IMO.
You should also sign up for wpMail.me, which contains a l …
1
vote
Accepted
How do I get my child-theme to work with my theme's includes folder?
Depending on how Canvas calls in those files, you might not be able to do this.
If they're using locate template or something similar (get_template_part, for instance), you'll just need to create y …
2
votes
Accepted
How to reverse engineer the Twenty Eleven background image uploader?
for the custom background, you'd call add_custom_background, for the cool header image things, it's add_custom_image_header. You need to hook both those into something like after_setup_theme:
<?php
…
0
votes
Accepted
Get most recent posts by category that aren't first overall
Well, you're going to have a lot of loops and a lot of custom WP_Query objects.
To start, create an $all_posts variable before you start the main loop on your home page. You should likely put all th …
2
votes
Accepted
different way to achive stylesheet_url
bloginfo('stylesheet_url') will always return the current theme's stylesheet. If current theme is a child theme, for example, it will return style.css relative to the child theme's root rather than th …
5
votes
Warning/Error in Admin Panel while developing theme
So you have your code in a class, let's say it looks like this...
<?php
class WPSE82245
{
public function action_init()
{
// do stuff
}
}
Now you try to hook it into something.. …
17
votes
4
answers
12k
views
Should Plugin Folders Include a Blank index.php File?
WordPress itself, in the wp-content folder, includes an empty PHP file which looks like this.
<?php
// Silence is golden.
?>
Should plugins include an empty file like this as well to stop folks vie …
83
votes
3
answers
29k
views
Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
Has anyone used autoloading and/or PHP namespaces within a plugin or theme?
Thoughts on using them? Any harm? Pitfalls?
Note: namespaces are PHP 5.3+ only. Assume, for this question, that you know y …
100
votes
Accepted
Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
Okay, I've had two big projects where I've been in control of the server enough to namespace and rely on autoloading.
First up. Autoloading is awesome. Not worrying about requires is a relatively go …
2
votes
Accepted
Menus, but not by theme location
wp_nav_menu takes an optional argument called menu, which will fetch any menu by name, slug or ID.
If you just want post objects (or anything but the menu HTML), wp_get_nav_menus is the way to go. …
1
vote
What is the best way to handle multiple calls to get_template_directory_uri() and similar fu...
I almost always define my own constants for things involving URLs (pattern 3).
The reasons:
Enqueueing does not account for child theme files. Using get_style_sheet_directory_uri will obviously …
1
vote
Wordpress Architecture as a CMS - Posts & Pages
There is an awesome plugin by @scribu called Posts 2 Posts. It allows you to manually associate different post types (or the same post type) with each other. I use it quite a bit for bigger CMS type …
2
votes
Accepted
Why does WP recommend against custom favicon functionality in themes?
Probably because a thing like a favicon is not necessarily tied to the on-page design, but to the branding of a site in general.
In other words: it's not specifically part of the "display" of the sit …
3
votes
Accepted
do_shortcode() in twentyeleven theme
It looks like twenty ten displays the excerpt on category archives.
If you're using manual excerpts, this is an easy fix. Just add this line of code to your theme's functions.php file. It tells wor …