question
stringlengths
0
34.8k
answer
stringlengths
0
28.3k
title
stringlengths
7
150
forum_tag
stringclasses
12 values
I'm trying to upload my plugin for the first time to the WordPress SVN. I've been granted access from the WordPress team. I am able to download the directory. Then I try to place my plugin files into the <code> trunk </code> folder, and then commit the changes. When I do this. I am prompted for my login credentials. I ...
Try changing your password @ wordpress.org then retry. If still fails check your firewall log If it still fails ... ask Andrew Nacin :) http://twitter.com/#!/blamenacin :)
Commit changes to WordPress Plugin SVN with TortoiseSVN
wordpress
I have a php function that executes inside an add_meta_box() in the WP content editor (see below) that I would like to convert to javascript so that it executes on a button click (on demand vs automatic on load) to convert the post content in real time (without posting to the server). Is there an equivalent method set ...
Hi @Scott B : This is really more of a StackOverflow question than a WordPress Answers question. I'll take a stab at it but if this is not what you need I'd suggest deleting your question here and putting it up at SO. The <code> Replace() </code> function in Javascript can take a function as an argument. Ben Nadel (who...
Does javascript have an equivalent to PHP's preg_replace_callback?
wordpress
I need to embed an iFrame into a post and it appears that tinyMCE or something is stripping it out when I go from HTML to Visual view while editing a post. I've found instructions for adding valid elements to tinyMCE but it only seems to apply to WordPress 2.8. No such file seems to exist under WordPress 3.0.1 (see sta...
Did you try this solution: stackexchange-url ("stackexchange-url
Embed iFrame in WordPress 3.0.1
wordpress
I was wondering if you really need to escape user submitted data (widget option fields) within the widget() and form() functions (from the widget class) ? I don't see a reason to do this, if the data is already escaped in the update() function. Or am I missing something?
Mm, they're not slashed, if that's what your meaning. However, they're definitely not xss-sanitized. Use kses before saving, or esc_attr() on display, if you're dealing with untrusted data.
Do widget options need to be escaped widget()?
wordpress
( Moderator's note: The original title was "Copy and Paste picture in post without linking to original") When I copy and paste a picture from another editor window it appears nicely but it links to the original location. Is there a plugin which lets me copy and paste images in a post (like it happens in Windows Live Wr...
@Jan: The cache images plugin: http://blog.milandinic.com/wordpress/plugins/cache-images/ helped me with this, it does not on demand replace the links but rather goes through all links but basically does the same. One note on this: when I ran it on a small blog it worked pretty well. On another blog (http://edward.de.l...
Retrieving and Storing Images Linked from Other Domains on Local Server?
wordpress
I'm in the process of setting up a (potentially) large multisite network, and I'm looking to make it as easy as possible now to add and configure sites when needed. I'm currently at the phase where I'm dealing with plugins. With multisite I am aware of several different ways you can activate plugins Put the plugin in <...
You can use the filter <code> site_option_* </code> . E.g. the following will disable akismet on blog with id 2. <code> add_filter('site_option_active_sitewide_plugins', 'modify_sitewide_plugins'); function modify_sitewide_plugins($value) { global $current_blog; if( $current_blog-&gt;blog_id == 2 ) { unset($value['akis...
How to disable a network enabled plugin for just one site?
wordpress
Trying to print my custom post type's taxonomy but without the link. Tried this, but doesn't seem to work, any suggestions? <code> $text = the_terms($post-&gt;ID,'type','','',''); echo strip_tags($text); </code> Any help would be greatly appreciated... I'm about to start punching babies.
You could use a filter and <code> strip_tags() </code> , as you suggested. Example using post tags, since that's the taxonomy I had available: <code> function my_remove_links( $term_links ) { return array_map('strip_tags', $term_links); } add_filter('term_links-post_tag', 'my_remove_links'); </code> Really though, I wo...
Strip tags from a the terms() function
wordpress
( Moderator's note: The original title was: "Shrink full size images in post") I built a WordPress site for someone and they entered a ton of posts with images that are wider than the content area. Is there a way to shrink all of the image attachements to use a max width? They are entered as "full size", not as thumbna...
Hi @moettinger : Great question! WordPress lacks some of the higher level imaging management features that would make it file maintenance like you need so much easier. The core WordPress team has been threatening to add enhance image features for many versions; eventually they might actually do it! Until then you'll ha...
Downsizing Many Large Images Attached to Posts, in Bulk?
wordpress
So what's the difference between these, and when should we use each one? Is esc_attr() safe enough to escape any type of data you get from the user ?
esc_attr() is, for the most part, an alias for a) kses (strips evil chars to prevent xss) and b) htmlspecialchars(), for use in HTML attributes. It can be used to display sanitized user input that cannot contain HTML. If you need only to sanitize strings before storing in the db, there are multiple variants of kses ava...
difference between esc_attr(), strip_slashes(), strip_tags()?
wordpress
Is it possible to make custom page templates available from a plugin?
<code> get_page_template() </code> can be overridden via the <code> page_template </code> filter. If your plugin is a directory with the templates as files in them, it's just a matter of passing the names of these files. If you want to create them "on the fly" (edit them in the admin area and save them in the database?...
Create custom page templates with plugins?
wordpress
I just decided to try using WordPress for a CMS (not a blog). The site will have some product information that I want the client to be able to update. Instead of creating an entire admin side just for them to update their products, is it possible to create a form in the WordPress admin so they can add products to a dat...
Hi @drpcken : Absolutely! That's exactly what I've been doing for months now. ( There are some <a href="stackexchange-url screenshots here to show you what's possible.) Just create a Custom Post Type for your their products, and then use a plugin to allow to you create Custom Metaboxes with fields. Here's a list to con...
Creating my own Admin Forms in a WordPress CMS?
wordpress
I have 2 pages in my wordpress 3.0.1 site with 2 urls www.mysite.co.uk/sub-page/child-of-sub-page/accommodation/ and www.mysite.co.uk/accommodation/ however any link in my site to www.mysite.co.uk/accommodation/ goes to www.mysite.co.uk/sub-page/child-of-sub-page/accommodation/ instead is this a bug in wordpress 3.0.1?...
I'm not seeing this behavior in my test install, using the page hierarchy you have described. I can access both the top-level accommodation page and the child page. Do you happen to have the Redirection plugin installed?
URL redirect problem
wordpress
I'm building a site where users log in to view content specific to them. I would like to display the last date and time they logged in. How would I get this information from wordpress? If it doesn't exist, how could I add it? Example: Welcome Back! Your last visit was on 10/25/2010 at 3:14pm. Thanks!
I don't see anything like it in the database, so you probably have to do this yourself. To save the last login time , you can hook into the <code> wp_login </code> action , and save a user meta value (like <code> [myprefix]_lastlogintime </code> ). You first read this value, so you get the previous login time, save thi...
Last time a user logged in
wordpress
I'm making a list of suggestion here . I need to insert current date/time for each of my suggestions - they are added accumulatively. If you have any idea on doing that, please share.
You're on WordPress.com, so there's no way to add functionality that will allow you to do this. You could always type the date/time manually whenever you update it.
How to insert current date/time in the content of a post?
wordpress
I had this working a couple of weeks ago and the only thing I can think is that WordPress has updated and broken the functionality? I followed the tutorial here to add custom fields: http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/ It was working fine (I entered about...
I put your code in a plugin and had to change two things to get it working: In <code> save_testimonial() </code> , you use <code> $post </code> but don't declare it as a global. So <code> $post-&gt;ID </code> will be empty, and <code> update_post_meta() </code> does not know what to save. Add <code> global $post; </cod...
Custom fields not saving in newest Wordpress 3.0.1
wordpress
Is there a way to show no gravatar in comment list for the commenters that are not registered at gravatar.com? As much as I saw, gravatar.com doesn't return a special code when no avatar is registered. The temporary, not so elegant solution I applied for the moment is displaying a transparent 1x1px gif but I'd like to ...
This plugin hides all avatar images, and preloads them in Javascript, so client side, which should activate the browser cache. If the image exists, the avatar is replaced and made visible. If it does not exist, nothing happens and the avatar image stays hidden. Tested in Safari and Firefox on Mac. <code> &lt;?php /* Pl...
How to display nothing (instead default) when no user gravatar is present?
wordpress
Picasa and Flickr provide Photo service. Is there any service for swf files so that i could share and use swf file in my blog? I don't like to upload swf on my wordpress hosting. I believe Google, Microsoft and Yahoo services only.
Would a generic file sharing and hosting site work? If you place the file in a public Dropbox folder and reference it from your site? See the Web Applications Stack Exchange for stackexchange-url ("more online file storage providers"). Make sure you check the Cross-domain policy : if the Flash file hosted on <code> dro...
Free swf files hosting for wordpress blog
wordpress
I am looking for what code one would need to add into the functions.php file which would allow specific metaboxes to show up in tags instead of within their individual metaboxes. Can anyone help with this?
Maybe you can inspect http://wordpress.org/extend/plugins/editor-tabs/
Placing Admin Post Metaboxes in Tabs
wordpress
I'm trying to show the latest posts using the <code> get_query_var </code> function. The function filters the posts according to their category. When I'm displaying the posts on the page they appear unsorted although I've added the <code> $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; </code> <code> $a...
If something unexpected happens between <code> query_posts() </code> and <code> get_post() </code> , it is probably a plugin that hooks into the query and modifies it. Try disabling all plugins to see whether the problem disappears. Re-enable them one by one until you see the problem, that is the plugin that causes it.
blog posts sorting doesnt work while using get_query_var
wordpress
Hi I have made an sql query that gets several posts according the parameters that i've selected. I'm showing these posts but the inner paging within wordpress doesnt do anything. It shows me that there are more pages but when i select the page number it shows me the same results as before. That makes sense because it p...
You need to use get_posts(), have_posts(), and the_post() for the API functions to work.
mysql query paging
wordpress
I'm updating programmatically posts in a WP 3.01 install, using custom made tools. Sometimes I do change programmatically <code> post_status </code> from DRAFT to PUBLISHED using custom <code> SELECT </code> queries, however this seems spoiling posts permalinks. When in a DRAFT state, posts have the following link stru...
You need to programmatically set the slug as you do so. An SQL trigger could do the trick. Don't forget to mind duplicate slugs as you write it. Else, instead of publishing using the database, write a php script that calls the WP API.
Create slugs programmatically
wordpress
I have a custom meta box which I would like to use to report on the markup of the current post or page (number of words, number of heading tags, etc). How can I obtain the post content into memory in order to parse and report on its content inside the meta box?
The callback for a meta box gets the current object (post, comment, link, ... depending on what you're editing) passed as the first parameter . So in your meta box handler you can read this first argument and access it's <code> post_content </code> to get the content.
How do I obtain the post content via a custom meta box inside the editor?
wordpress
I have a custom hierarchical taxonomy that is called 'Categories', but serves a different area of the site than the default "Categories" taxonomy. The problem I'm having is with selecting children terms in the interface while posting content. If the user selects and children terms, they move to the top of the Categorie...
This seems to be normal, it also happens for categories. The <code> wp_terms_checklist() </code> , which creates the checklist, has an argument <code> checked_ontop </code> , enabled by default. The metabox does not override this , so checked categories or custom terms always appear on top of the list. This does not af...
Custom hierarchal taxonomy loses interface hierarchy when selecting parent & children
wordpress
I created a new blog using WordPress.com and obviously it got hosted on their server. But what I notice is that few features are not visible in this version as compared to the WordPress PHP script that I downloaded and hosted on my server. For example: the Plugins options is not visible anywhere from where I can upload...
WordPress.com is running the same code that you can download for free at WordPress.org ... the biggest difference is that .com is run by a for-profit company and .org is maintained by a non-profit community. WordPress.com, as a for-profit enterprise, has certain features disabled (for security purposes) and certain fea...
Feature Differences between WordPress.com and Hosting on your Own Server?
wordpress
I noticed that deleted users still show in the count of the users admin screen. On one blog I deleted 9 users only leaving the admin but it stil shows 9 in the count. In the physical database they are no longer present in the wp_users and wp_users_metadata so.... i guess that the counter is uhm... somewhere else in the...
Look no further, then. It's one of the joys of lack of referential integrity combined with workflow bugs. Please report this in the WP bug tracker.
deleted users still show in count?
wordpress
Is there an easy way to paginate the result set coming from $wpdb-> get_results()? I want to get a paginated list of a user's comments on the author_archive page - some of the users of the community have > 500 comments, so pagination is important. Is there an in-built way of doing this with WordPress, or do I need to b...
You can use the function paginate_links() for any pagination. For your specific case: <code> $total = $wpdb-&gt;get_var(" SELECT COUNT(comment_ID) FROM $wpdb-&gt;comments WHERE user_id = $thisauthor-&gt;ID AND comment_post_id = ID AND comment_approved = 1 "); $comments_per_page = 100; $page = isset( $_GET['cpage'] ) ? ...
Paginate result set from $wpdb-> get_results()
wordpress
I've tried three plugins to do this, non of them worked (I'm using WP 3.01): http://wordpress.org/extend/plugins/sem-external-links/ http://wordpress.org/extend/plugins/external-nofollow/ http://wordpress.org/extend/plugins/nofollow-external-links/
If you're experiencing bugs with my own plugin (sem-external-links), be so kind to say how it's not working...
Adding rel="nofollow" to external links in posts?
wordpress
I've used add_meta_box() to add a custom meta box to the WordPress edit window on both pages and posts. How can I make this meta box also show on the "Quick Edit" screen? Ideally, I'd like it to appear just to the right of the Categories selector.
There seems to be no easy way to do this, you must add all code yourself. <code> inline_edit_row() </code> , the function that draws the Quick Edit and Bulk Edit screens, seems to have only one action that you can hook into: <code> quick_edit_custom_box </code> or <code> bulk_edit_custom_box </code> . It gets called fo...
How to show a custom meta box on the "Quick Edit" screen?
wordpress
I am presently trying to call the fields of a custom widget using get_option and loop through the array created from the get_option() call. The issue is that it is outputting a blank one at the end, resulting in one extra than what I have enabled. Here is the code I have at the moment: <code> $the_team = get_option('wi...
No further help is needed. unset($the_team['_multiwidget']); worked, and was the element in the array that was showing up at the end of the call. Will have to research what that part is exactly for future reference.
get_option returns undesired blank instance of a widget
wordpress
hey all! i have an odd problem with URL routing. when i request a URL that doesn't exist, e.g. http://localhost/foo , wordpress correctly returns a 404. however, if that URL is a prefix of a post or page name, it instead returns a 301 redirect to the post or page. for example, if i have a post on 10/1/2010 named Food P...
This is normal, it is because <code> redirect_canonical() </code> , which makes sure you are always at a "canonical" URL (conforming to your permalink structure), executes <code> redirect_guess_404_permalink() </code> to make a best guess at a post when the URL is incomplete . If you want to prevent this, I think the b...
301 redirect instead of 404 when URL is a prefix of a post or page name?
wordpress
I was opened this idea 7 months ago: http://wordpress.org/extend/ideas/topic/non-latin-characters-need-love Still i couldnt find a solution for it. Simply what i want? Want to use "şŞ İı Ğğ Üü Öö çÇ" turkish characters in permalinks / slugs.
You must go about the language functions-interface. See my example for german users: http://wordpress-buch.bueltge.de/wp-content/uploads/2010/05/de_DE.phps We must also build differences on the permalinks for aour charachters in our language <code> /* define it global */ $umlaut_chars['in'] = array( chr(196), chr(228),...
Non-Latin Characters in permalinks
wordpress
I'm building a site for a photographer who uploads pictures that are normally large for todays digital cameras. Images are quite memory intensive, especially the image operations like creating thumbnails. So I wanted to raise the memory limit in the admin above 256MB - how can this be done? I allowed CGI and PHP to use...
Theoretically, editing your config.php and add this line before wp-settings.php inclusion. <code> define('WP_MEMORY_LIMIT', '256M'); </code> should raise your memory limit for WordPress to 256MB or whatever value you set. And this will work sitewide. However, as stackexchange-url ("sorich87 pointed out"), there are few...
How to use more than 256MB of memory in the admin?
wordpress
( Moderator's note: The original title was "Is it good to use picasa web album for images in wordpress blog?") Is it good to use Picasa web album for post's images in WordPress blog? What are pros and cons? Which one (Flickr or Picasa) is more suitable for blog post's images?
Hi @Brij : Both @George Wiscombe and @anu have good suggestions. To elaborate though, I'd say it depends on one of the following criteria: Do you plan to write programs using one of their API? If yes, review their APIs and pick the one you are most confortable with. Here are their APIs: Flickr's App Garden API Picasa W...
Managing Images for a WordPress Blog: Picasa or Flickr?
wordpress
Typically in my theme function file I'll require other files to keep things neat. <code> require_once("foo.php"); </code> Now working in a child theme I'd like to do that same. I'm adding custom admin options and it seems impossible to include code. I've echoed out the path to make sure I'm calling the right file and i...
Child themes reference parent themes by directory name, and in a normal install all your themes live in <code> wp-content/themes/ </code> , so I'd say it's fine to reference those themes by their relative path: <code> include '../parent-theme/some-file.php'; </code> If that makes you uncomfortable, I observe the follow...
Include files in child theme functions file
wordpress
I have been tasked with creating a site for a large audience, and many of the audience will require some sort of sign up. They may require certain account controls (visual things, like theme colours for colour blind people) but largely it will just be a way to monitor the use of the contact features (so users can monit...
It's few months already and you probably have this solved by now but I'll try to do a little necromancing resume here anyway. We don't like unanswered questions right? ;) There's a recent topic dealing with the front-end login &amp; registration: stackexchange-url ("Front-end Register Form") You can change what WordPre...
Advice on setting up a site with front end registration
wordpress
I have the following custom query written for a page- <code> $menu_loop = new WP_Query( array( 'post_type' => 'page', 'posts_per_page' => 50, 'post_parent' => 616, 'order_by' => 'post_title', 'order' => 'ASC' ) ); while ($menu_loop-> have_posts()) : $menu_loop-> the_post(); </code> The problem is, when the content is o...
Your sorting parameter should be: 'orderby' => 'title'
Problem with WP_Query sort
wordpress
I am looking for a way to do some conditional logic on terms associated with a post. Essentially I created my own custom taxonomy for "age groups" and have created three terms for them. Kids, Teens, Adults... In the admin area I want to check the terms which apply to a specific post and on the frontend of the site with...
Hi @NetConstructor: First thing, assuming your logic worked you can use the ternary operator to simplify your example: <code> &lt;li id="kids-&lt;?php echo is_term('Kids','age_groups') ? 'on' : 'off'; ?&gt;"&gt;Kids Programs&lt;/li&gt; </code> The issue seems to be that <code> is_term() </code> is used to check if a te...
Checking if a Page has an Associated Term?
wordpress
Hi I see a wordpress.co m blog and on the latest post there is a redirect for the external links via "http://go2.wordpress.com/" redirect. This redirect is obfuscated - on hovering the link it displays a "http://google.com/url?..." redirect instead. What is this and why is it suddenly on this post and not others? Also,...
It seems to be generated by API for affiliate service. See this topic Link redirection through go2.wordpress.com : The redirection is for a skimlinks ad service we are running.
What is the http://go2.wordpress.com/ redirect?
wordpress
As some of you know, there's an Easter Egg hidden in the WordPress post revision system that will display a message from the movie The Matrix if you perform a specific action (if you don't know, I won't spoil the surprise ... poke around with post revisions and see if you can find it). I love Easter Eggs, and this one ...
The following plugin dynamically hides the two offending radios using jQuery, and kills revision self-comparisons. <code> &lt;?php # Plugin Name: Pest Control # Plugin URI: http://www.semiologic.com/ # Description: Kills the Easter Bunny # Version: 1.0 # Author: Denis de Bernardy # License: Public Domain class PestCont...
Coding Challenge - JavaScript Easter Egg
wordpress
I'm looking to do a custom import from a custom cms to wordpress. Looking at the export/import files in wordpress, I can get match most of the structure. Though, it is missing the relationships for custom taxonomies and posts when exporting/importing. Is there a fix for this or would it be easier to not use wordpress's...
It shouldn't be hard to add handling for custom post types or taxonomies within a custom importer for WordPress. You'll just need to make sure that your custom post types and taxonomies are registered before the importer runs. Once registered, you can use wp_insert_post() and wp_set_object_terms() on these custom types...
Custom Import with taxonomies
wordpress
I am almost completely happy with a new site I built - see http://www.fatasbutter.com.au/gallery/the-music/attachment/019/ As a final touch, I want to add <code> #content </code> to the end of the link location for each <code> previous_image_link() </code> and <code> next_image_link() </code> . Any ideas on how to do t...
This is kinda dirty, but I can't find a better hook: <code> function add_content_hash( $link ) { $link = str_replace("' title='", "#content' title='", $link); return $link; } add_filter( 'wp_get_attachment_link', 'add_content_hash' ); </code>
Add #content to next_image_link()
wordpress
I have a set of custom post types with the <code> capability_type </code> argument set to <code> 'page' </code> I want to include these in <code> wp_list_pages() </code> or similar so I can use the dynamic classes (such as <code> .current_page_item </code> and the like). I've read stackexchange-url ("this post") but I'...
The <code> wp_list_pages() </code> function calls <code> get_pages() </code> , which can't be easily overridden with a different post type. Here's a basic modification of that function which calls <code> get_posts() </code> instead. This takes basically the same arguments as wp_list_pages , with one additional: *post_t...
Dynamic navigation for custom post type (pages)
wordpress
I'm trying to figure out how to hook into the <code> /wp-admin/users.php </code> manage page to create custom columns for showing the number of posts users have for the custom post types on WPHonors.com . I created a trac ticket for this but @nacin explained why it's a job more for a plugin to do instead. I have been u...
Here's an expansion of Mike's tutorial answer. I added links to the types listed so you can click on one and be taken right to a listing of all the posts in that type for that author, which required an additional variable for <code> $counts </code> and some extra output for <code> $custom_column[] </code> <code> add_ac...
Showing User's Post Counts by Custom Post Type in the Admin's User List?
wordpress
We have Wordpress 3.0 working as multi site, and we want all the blogs in the system to have the plugin " sexy bookmarks ". But it seems to be working only in the main blog. Does anyone know how to make it work in all blogs (what code to add to make it work that way)? Or is there a plugin like sexy bookmarks that adds ...
If the plugin is alreayd activated, then you cannot network activate it. because you already turned it on. Turn it off. Network activate it. You still have to configure it for each blog.
How to make sexy bookmarks plugin work in WPMU
wordpress
I need to retrieve the URLs for the images inside a gallery, what's the appropriate SQL query for this, based on the post ID? I currently have something like the following which I found on via google , but I don't know how to access the global WP variable from outside Wordpress - what do I need to do? <code> function g...
I believe the function is wp_get_attachment_url(). There also is one for thumbnails. See wp-includes/media.php.
Get urls of images in a gallery?
wordpress
( Moderator's note: The question's original title was: "Custom query: Show custom post types plus custom post type with post meta on blog homepage") I'm in need of help with a custom query. I have three custom post types: "News" , "Events" , "Stories" . On the main blog page, only News and Events will show. The client ...
Hi @webcodeslinger: Here's what a basic MySQL query for loading News and Events would look like (this is greatly simplified from what WordPress actually does): <code> SELECT * FROM wp_posts WHERE post_type IN ('news','events') </code> What you want instead is something like this (there are more performant ways to do th...
Conditionally Query Custom Post Types by Post Meta for Blog Home Page?
wordpress
I have a custom post type, and in one of the custom meta-fields, I would like to present a drop-down list of the other (published) custom posts in order to link two custom posts. Specifically, I have a Film type, and some Films are screened as double features with other films. Currently, I just have a field for the oth...
The Post 2 Post plugin by Scribu is exactly what I needed.
Can I get an auto-populated dropdown list of other custom posts in a custom post edit page?
wordpress
I changed a custom post_type to a different name. Now when I view a single page with the post_type I receive a 404 page. How do I debug? Is there a WP log I can view the functions call?
Just try to update permalinks (i.e. Trigger a flush of the rewrite rules).
I changed post_type and now I receive 404 errors
wordpress
having trouble educating clients to compress their images, and would quite like wordpress to compress images to predefined size (normally, 800px long edge, 72dpi) and discard the original
Use http://wordpress.org/extend/plugins/auto-image-resizer/ Add this to your functions.php: <code> function prune_image_sizes($sizes) { // You can add other size like that for remove those sizes // unset($sizes['medium']); unset($sizes['large']); return $sizes; } add_filter('intermediate_image_sizes_advanced', 'prune_i...
Can images be automatically compressed?
wordpress
I am trying to make a custom Category Display on my side bar and for that I need some way to get both, the category list and the child list in 2 different arrays or something alike... First, I tried the function <code> get_categories </code> , but it does not allow me to gather top-level categories only: <code> $args=a...
You can skip categories that have parent in your loop: <code> foreach($category_list as $category) { if( '0' != $category-&gt;parent ) continue; </code> I've looked through the source, but it seems <code> depth </code> is only taken in account in <code> wp_list_categories() </code> and you will probably need to extend ...
Custom sidebar category listing?
wordpress
I have a site where posts get created and expired often. I want to add 410 status code to all posts that expire so that Search Engines remove them. I want to know if wordpress provides a provision to do this? or is this possible at all? Any suggestions how to achieve this would be very helpful. Thanks
Just did some testing and seems there is a bug here. Newly created draft posts are not accessible on front-end. Search bot (or anyone else not logged in and using special preview URL) gets 404 error on them. But if you publish and change back to draft then post remains available by direct link (does get removed from in...
Make posts 410 dynamically
wordpress
Considering stackexchange-url ("how often functions.php") is called, shouldn't all of its contents be hooked or filtered into core WP functions like init?
It can be used for much about anything that requires php... You'd only use hooks if you don't want to execute the php logic immediately. This is usually the case, but not always. Likewise, you'd typically use the WP API. But not always either...
Should everything in functions.php be hooked or filtered?
wordpress
Seems throughout the day my blog seems to show 404 page errors with no pattern. I have to manually change the permalinks from /blog/%scategory%/%postname%/ to default, then back to /blog/%scategory%/%postname%/ in order to fix the permalink issue. This has been a problem for us for the past six months, and our site get...
I stopped using that plugin a long time ago. I don't think you really need it anymore honestly. I just remember it did the same thing that I was able to do when I disabled it, so I stopped using it. I don't think its still supported by the developer either, so may be out of date. I may be wrong, but then again I use th...
404 Error Problems with sCategory Permalink plugin
wordpress
I'm using WordPress 3.0.1 and I have made custom post-type called <code> 'dienasgramatas' </code> . My plugin also makes custom rewrite rules for displaying all posts from this post type and even custom permalink structure to query posts with this post type coming from defined author, but I can't create rule for pagina...
Hi @banesto : I think the simple answer may be that you need your paged URL to be specified before your shorter URL, but since I didn't test it I'm not 100% sure. That said, I've always run into a lot of trouble with the <code> 'generate_rewrite_rules' </code> hook. I'm sure a better developer than me could make it wor...
Custom Post Type Rewrite Rule for Author & Paging?
wordpress
( Moderator's note: Title was originally "What are all the variables in the wordpress post object?") Does anyone know the variables that are stored in the WordPress Post object?
Post object is mostly queried row of <code> wp_posts </code> database table with some extras. It is easy to dump content of one and see: <code> object(stdClass) public 'ID' =&gt; int public 'post_author' =&gt; string public 'post_date' =&gt; string public 'post_date_gmt' =&gt; string public 'post_content' =&gt; string ...
What are all the Properties of the WordPress Post Object?
wordpress
In an effort to combat comment spam, I'd like to hide or remove the "Website" field from the "Leave a Reply" section for page and site comments. I have no desire to increase others page rankings by having them embed their URLs in my sites comments, which seems to be what 99% of the comments on my site are wanting to do...
Create a file in <code> wp-content/plugins/ </code> with this code: <code> &lt;?php /* Plugin Name: Get Rid of Comment Websites */ function my_custom_comment_fields( $fields ){ if(isset($fields['url'])) unset($fields['url']); return $fields; } add_filter( 'comment_form_default_fields', 'my_custom_comment_fields' ); </c...
Removing the "Website" Field from Comments and Replies?
wordpress
I was wondering if there is a simple way to replicate my configurations for all the subsites once i have activated a network plugin without having to go thru each and configure it manually ? Upgrade a set or single network plugin(s) with the same configuration to all subsites
I've had to write some custom stuff to copy settings across blogs. Currently I've got a plugin with two textareas: A read-only box with a base64 encoded serialized string of all the blog options ( <code> wp_options </code> ) I care about (in this case, widgets, sidebars, and options from a specific plugin ) A field tha...
Replicate network plugins without having to configure it for each subsite?
wordpress
So, for the thousands using WP as CMS, a typical approach is that of using the 'A Static Page' option from the Settings > Reading admin page. However, I'm in a different scenario: our front page is displaying static content ( home.php template drives that), and we have a secondary static page (called News ) which shoul...
The way I retrieve posts on my blog is to use the following: <code> &lt;?php $recentPosts = new WP_Query(); $recentPosts-&gt;query('showposts=5&amp;cat=CAT_ID_GOES_HERE'); while($recentPosts-&gt;have_posts()): $recentPosts-&gt;the_post(); ?&gt; </code> Then you would go and create the code to control the display of eac...
How to get the list of posts in a static page other than front page?
wordpress
How can I attach images to a post which have already been attached to other posts without having to upload them twice? I don't want to insert the images into the post, I simply want to attach the same set of images to multiple posts. As of WP.3.0.1 it does not appear that this is possible, however, if the "Media Librar...
As you've noted it's not possible out of the box. The feature was supposed to make it into 2.9, got postponed until 3.2, and assuming they reject the post2post table mike and I crave for it'll probably be postponed again. You'll have better luck creating a custom taxonomy in the meanwhile, and "tagging" images tied to ...
Possible to "Attach" images to multiple posts without inserting or uploading twice?
wordpress
Trying to get my head round functions.php and am wondering how often it is loaded?
Simple answer is once. As any other PHP file otherwise it would likely cause crash because of function redefinitions. More complex answer is there can be actually two different <code> functions.php </code> loading - one for parent theme and one for child theme. Tricky part here is that child theme's loads before the pa...
How often is functions.php loaded?
wordpress
According with stackexchange-url ("Wordpress: category page not for post's"). I use wordpress to create web sites for flash games, so I don't have certain page for post's. I add each game by post-new.php?post_type=game and u can see it's not the regular post for wordpress. Now I try make the same for tags, but stuck ag...
I've solved my task! 'begin_roundblock' and 'end_roundblock' are my functions for making blocks to games. 'cols' and 'rows' are number columns rows and rows for games. <code> if ($tag) { $cols = 9; $rows = 5; $paged = (('paged')) ? get_query_var('paged') : 1; $post_per_page = $cols * $rows; // -1 shows all posts $do_no...
Tags page not for post
wordpress
I'm pulling my hair out over this. In the Links manager, you can enter a description for the category (in addition to the link itself). However, in wp_list_bookmarks, there is no way to call this value anywhere. So how can I get it? I know it's in the term_taxonomy table, under link_category. So is there a function tha...
OK, with the help of a friend I was able to get this done. I ditched the wp_list_bookmarks and went with a combination of get_terms and get_bookmarks. <code> function blogroll_page( $args = array() ) { if(is_page('blogroll')) { if( $terms = get_terms( 'link_category', $args = array('exclude' =&gt; 16) ) ) { foreach( $t...
Link Category Description
wordpress
I'm trying to set up individual, one-time schedule events in a plugin. No matter what I do, I can't seem to get the events to fire. I'm using the Cron View plugin to see what's in queue, and the events are added and remove themselves totally on schedule. I never, however, receive the email I've set to send in the actio...
The cron arg usage looks weird. The insert id will return garbage by the time your function is called. By the same token, I believe better schedule it always, with the id argument, on insert, if this if for logging. Else you'll be throttling your logs, basically. Lastly, are you sure that wp_mail() is working?
Scheduled event won't fire
wordpress
I'm trying to build a new WordPress theme using register_post_type to create a custom post type called listings. I would like each listing to have the following permalink structure: http://www.mysite.com/%author%/listing-title I'm not quite sure how to achieve this with the CPT controls listed in the Codex. Previously,...
My plugin Custom Post Permalinks allows you to set permalink structures for custom post types and it supports post authors as part of a permastruct. However, while my plugin will enable you to set up that structure, I don't suggest using that structure. That structure will essentially make WordPress interpret all top-l...
In WordPress how do you create a custom post type with the author's name in the slug?
wordpress
I would like to alter the default categories widget code so that it does not show any categories which are children of the uncategorized (id=1) category. Can I do this via my sidebar.php or functions.php code?
If memory serves, there's an exclude argument, which isn't available in the widget but which should be around for the category list template tag. http://codex.wordpress.org/Template_Tags/wp_list_categories It should hide subcategories if you're listing them hierarchically.
How can I alter the display of category listings via sidebar.php?
wordpress
A client of mine has a VERY, VERY, VERY large WordPress site (over 1 million pages). Is there a sitemap plugin that can handle this (would need to create sitemap indexes)? Their site have very shallow crawldepth, so they figure a sitemap would help a lot.
Quick search shows that next major update of Google XML Sitemaps plugin will have index-based sitemap . Overall sitemap is not a guarantee that site will be crawled and I'd also look into other ways to improve (better and more extensive navigation, more internal links, etc).
Best Sitemap Plugin for 1M+ pages
wordpress
This is a pretty strange problem. I'm creating a WordPress custom post type in my themes functions.php file using the following format: <code> add_action('init', 'product_register'); function product_register() { $args = array( 'label' =&gt; __('Products'), 'singular_label' =&gt; __('Product'), 'public' =&gt; true, 'sh...
The new permalink structure is only saved when <code> WP_Rewrite::flush_rules() </code> is called. Because this is an expensive operation (calculating the new rules and saving them to the database), you should not do it on every <code> init </code> call, but only when you change the structure. The custom post type howe...
WordPress custom post types breaks permalink on theme reinstall
wordpress
My blog design heavily relies on categories and sub-categories. I would like the url structure to be dependent on that. How can I make the url's support the same? I would like it to be like: <code> http://www.mywordpressblog.com/categoryname/subcategoryname/postname.html </code> It should also support further sub-categ...
With the following as a permalink structure; <code> /%category%/%postname/ </code> The category slug is added to the URL. Subcategories, if any, appear as nested directories. So you end up with ; /category/your-post-slug/ And if subcategories are used /category/subcategory/your-post-slug
Create a url structure for my blogs based on categories and sub-cats
wordpress
Someone set me up with some custom work on top od another them and now I want to add a "what's new"/"blog"/"latest news" type page that is accessible from the main menu and is NOT the home page. How can I do that? It is not obvious to me how that is done. Thanks.
In the admin area, Go to Settings » Reading , Choose ' A Static Page ' from the first set of options &amp; select the two pages you would like to use as the front-page &amp; blog/news page. Hope this helps, G
How do I set up "blog" posts to a page other than the main/home page?
wordpress
Flushing rules is clearly an important part of creating themes with custom post types. See here and stackexchange-url ("here"). Does anyone have any example code of how to flush rules from functions.php? I'm a little surprised this isn't covered in the custom post type pages of the Codex. Update: I tried adding this to...
While the solutions provided here do still work, WordPress has evolved since and does now (since 3.3, I believe) provide direct hooks for theme activation. <code> after_switch_theme </code> will fire on theme activation and <code> switch_theme </code> before deactivating an old theme. Hence the up-to-date answer is: <c...
How does one flush rules on theme activation or deactivation only?
wordpress
I have this bit of code in my Meteor Slides plugin that loads a stylesheet on the admin pages of just the slides custom post type: <code> add_action('admin_head', 'meteorslides_admin_css'); function meteorslides_admin_css() { global $post_type; if (($_GET['post_type'] == 'slide') || ($post_type == 'slide')) : echo "&lt...
You need to check for the presence of <code> 'post_type' </code> as an index of <code> $_GET </code> before using it: <code> if ((isset($_GET['post_type']) &amp;&amp; $_GET['post_type'] == 'slide') || (isset($post_type) &amp;&amp; $post_type == 'slide')) : </code> Also, you should be using the <code> wp_enqueue_style <...
Adding CSS to custom post type admin page causes error
wordpress
I've read a few books on building WP themes and I certainly understand the basics. I would like to know read up on advanced topics like hooks, wp_rewrite and how functions.php should be structured. Can anyone recommend any good resources?
The best resources available are: The Codex - Most of the functions and tools you'll want to use are documented there, as well as examples and code snippets that you can use in your own system. PHPXref - There are a lot of different systems out there, I just linked to the first one I found. But remember that the in-lin...
Advanced theme training?
wordpress
Currently I have a small amount of 100 categories and my MENU goes crazy big and I would like to be able to do 2 things if possible: First category menu with limited amount categories sorted by hits Second category menu with limited amount of categories choose by myself Is there any simple way to acomplish this either ...
I have moved away from looking for a plugin and adventured myself into making my own modifications, see stackexchange-url ("stackexchange-url In regards my question here I have found the follow: Yes, it is possible to limit the amount of items listed on the category by setting the number argument that can be used with ...
My Category is too big on the Menu what can i do?
wordpress
Right, please excuse the stupid question. On my new blog I want the home page to be the "home" page I've created, and not the list of articles... that's fine, I go to <code> Settings -&gt; Reading -&gt; Front page displays </code> and change <code> Front page </code> to <code> Home </code> . But now I want <code> /blog...
This depends on how the index.php of your theme is coded. If it is a standard blog index page (as it is in 2010), all you need to do is: create a page named "blog" (or whatever you fancy), no need to add any content or select any template, in wp-dashboard > Settings > Reading: tick "static front page" select your "home...
Blog page problems
wordpress
I have a client who has an annual complete makeover of their website design and content, but they still want their old sites available to view (each with that year's respective design/CSS). Once these blogs are "archived", I don't want to have to maintain them any more w.r.t. updating plugins and core files. Previously...
I think HTML mirror is the way to go here. There is no point keeping dynamic site that doesn't need to be. And leaving it unmaintained is not really possible on auto-pilot - even if updates are automatic there is no guarantee some plugin won't get just dropped by developer. Alternatively you can build multi-design site...
How can I permanently cache or "archive" a WP blog without needing future maintenance
wordpress
( Moderator's note: The original title was "Is there a way to get post comments by post ID on a custom loop using WP-Query()?") Hi! I'm running a custom loop using WP_Query , that only displays one post from a specific category on the home.php page, like so: <code> &lt;?php $pr_q = "cat=11&amp;posts_per_page=1"; $pregu...
To be able to use the comments template in your loops, add <code> global $withcomments; $withcomments = true; </code>
Getting Post Comments for post ID using WP_Query() and a Custom Loop?
wordpress
The weirdest Wordpress problem ever I think. A clients site with a large database of posts has got a mind of it's own. One minute everything seems fine, the next posts, categories and tags are missing. At the minute the dashboard is telling me there's 2309 posts in 9 categories but when I click the categories link in a...
You're probably running into the joys of MySQL's MyISAM engine... From within MySQL (or PhpMyAdmin), use REPAIR TABLE xyz statements again, repeatedly, on each of your tables (or rather, your terms related tables, since these are the ones that sound corrupt) to see if this solves anything. If those fail, there are a fe...
Corrupt Wordpress Database
wordpress
I have some PHP code that I would like to pull out of an existing page of a template, and put into a widget so I can move it around. What is the quickest way to create a widget?
The Widgets API is the quickest way to make a widget that's reusable. Example use: <code> class My_Widget extends WP_Widget { /** * PHP4 constructor */ function My_Widget() { My_Widget::__construct(); } /** * PHP5 constructor */ function __construct() { // actual widget processes } /** * Echo the settings update form *...
What is the quickest way to make a widget?
wordpress
I need to know if the 'Shopp' e-commerce plugin can be modified to display radio buttons instead of drop down menus for the product options. I don't need you to tell me how this can be done (though that would certainly be welcome), just if it is possible. I don't want to invest in Shopp unless it is something that has ...
This example highlights the versatility of interface options you can create by using radio inputs to select a product variation rather than the default menus. This section of code could be used in place of the variations code block in either the product.php template file or the category.php template file (if you want v...
Can Shopp Commercial Plugin be hacked to display radio buttons instead of Dropdowns?
wordpress
I've been toying with the idea of developing a custom resume/portfolio theme for some time ... but just haven't gotten around to it. Lately, though, I've fallen in love with a few new site designs and feel that it's time we had a truly interactive and dynamic theme to power resumes and portfolios with WordPress. So her...
I would like to see dynamically expanding detail boxes, so you can provide optionally more details on specific areas of experience (such as a code snippet, or more complicated project information) should the interested party wish for more. That way you keep it simple and clean yet show them there is more under the hood...
Feature Survey - What would you want in a resume theme?
wordpress
In my game website I would like to implement a Screenshot page where my registered users can upload images to it (it might be more then 1 screenshot page, 1 for the users and 1 for the game in question what I mean is users can upload and the staff will be using the game website available images so it would be 2 differe...
I just found this plugin that entirelly fits my needs while I modificating the NextGen so I tought I should post it here in case some one was looking for something like this: http://wordpress.org/extend/plugins/nextgen-public-uploader/screenshots/ With this I can simple set the minimun access to subscribers and add a t...
Personalized Gallery what are my options?
wordpress
I need to have a bit of frequently changing content in a sidebar (the time and location of the next meeting of a club). What I'd really like is a nice widget that displays <code> the_content() </code> of a selected page or just has a rich text field and displays what's in that. I figured there would be something like t...
How about the Rich Widget ?
Display some arbitrary HTML or content in a sidebar
wordpress
Im using a wfcart in my WordPress site but for some reason on certain pages WordPress drops the session I'm wondering if there is a way to enable sessions in WordPress 3?
If you need to manually enable the session globally, use this in your functions.php (I included a line for manually setting a session variable as an example, not required): <code> add_action('init', 'session_manager'); function session_manager() { if (!session_id()) { session_start(); } $_SESSION['foo'] = 'bar'; } </co...
Enabling Sessions in WordPress 3.0
wordpress
Has anyone seen a drag&amp;drop plugin for files into the media library for WP? Would be very interested with such a plugin. Edit - Seems like Google will sponsor this project on GSoC 2011
It appears that this idea is being addressed in trac: http://core.trac.wordpress.org/ticket/13054
Drag & drop HTML5 file upload into the media library?
wordpress
A bit of a noob PHP question coming up. I am trying to create a generic archive style view for my custom post types. Ideally I want to create one generic template that can be used for all post-types. Currently I use this as my have_posts query to bring in all posts of 'custom-post-type' <code> &lt;?php $args=array( 'po...
As @Rarst mentioned in the previous comment this is going to be patched in WP3.1 The template hierarchy is "archive-customposttypename.php". WordPress 3.1 template hierarchy
Using wordpress template tags within an array
wordpress
I have several different sites running off WordPress, and the URLs tend to get fairly long and cumbersome (particularly when I try to publish them via Twitter). I recently purchased a very short domain name, and I'd like to use it as the root of a personal URL shortening service. So ... <code> http://www.eamann.com/por...
I've set up YOURLS for and have been extremely pleased. With the wordpress plugin, it will automatically create a short url for you if there isn't one. And with the Admin of YOURLS you can create your own custom short url's to anything you want, granted it isn't in WP Admin. I don't believe you can set your own custom ...
How do I set up a custom URL shortener for my posts?
wordpress
For example... <code> add_action('init', 'reg_tax'); function reg_tax() { register_taxonomy_for_object_type('category', 'attachment'); } </code> Adds a "Category" input field to the media manager and attachments editor. I'd like to know if its possible to alter this function to capture a "link destination" URL instead....
I use a very rough plugin to add information about the artist and a URL to media files. It needs some tweaking (and I need the time), but it works and may demonstrate how add the extra fields and how to use them in your theme: <code> &lt;?php /* Plugin Name: Toscho’s Media Artist Field Description: Adds two field to at...
How can I add a URL field to the attachments window?
wordpress
I have a post written in Microsoft Word with images, text and some formating. Is there some easy way to import this document into WordPress? Either a plugin for Word og perhaps a plugin inside WordPress? I'm looking for something simple that also converts images.
There are 3 ways you can import content from Word: Paste from Word There's a button in the editor that allows you to paste content directly from Word. This removes the special formatting Word uses to lay content out on the page and will make things work well on your site. (The button is in the "Kitchen Sink" on the Vis...
Easy way to import a post from Word?
wordpress
The administration part for my plugin is divided into several pages and for some pages I would like to enqueue a JS source which would add jQuery functionality to various elements. Right now this is my approach: <code> function admin_register_init() { if ($_GET['page'] == 'worldexplorer_admin_location_hub') wp_enqueue_...
I believe there is a hook <code> admin_print_scripts-{$page} </code> which might fit. See this Load scripts only on plugin pages
Including a JS source with an admin page
wordpress
I have a blog that I often need to insert iframes into posts for various reasons (don't ask why just trust me!) When I use the "visual" view to edit my posts the WYSIWYG constatantly strips out my iframes ... I know I can keep the iframes in the post if I use the "html" view and only view/save from the "html" view ... ...
If you don't want to write your own code there is a plugin to allow embedding an <code> &lt;iframe&gt; </code> : Embed IFrame Plugin for WordPress Then just use the shortcode like this: <code> [iframe http://example.com 400 500] </code>
Make WordPress WYSIWYG not strip out iframe's
wordpress
I downloaded the free Wootheme Irrestible and if installed on a stand alone Wordpress , works very well . Now, if we enable Multiple Sites on 3.x and set this theme to be the theme of a new site it simply does not work out-of-the-box. As WooThemes Support is only for paid customers, and being this a free theme, I can a...
You really need to specify how it does not work. There are no multisite-specific theme tags. 99% of the themes out there for WordPress work in a network. If you're getting errors, check your error logs. If it's not grabbing image th8umbnails, that's a known issue - not with multisite or the timthumb script, but how the...
What changes we need to make to a theme so it can be installed as a MU Theme?
wordpress
Given a Vimeo ID, I can retrieve a thumbnail from the video via Vimeo Simple API. Rather than call the API every time my page loads I want to set the image as the post thumbnail using the <code> save_post </code> hook (similar to stackexchange-url ("this question")). My problem is that I am not familiar with URL calls ...
My favorite way of handling this problem has been to use a little documented function I discovered on another stack post: media_sideload_image </code> It works by fetching an image url to the WordPress upload dir and then associating the image to a post's attachments. You can try it like so: <code> // required librarie...
How to retrieve image from URL and set as featured image/post thumbnail
wordpress
hi can anyone recommend a good search engine plugin that allows the users to search for posts, blogs, forums, users, etc and shows the results as a combined result and not divided into categories? we need a good plugin in our site that will not override the normal wordpress search. we're using wordpress and buddypress....
maybe this Premium Plugin can help you: http://codecanyon.net/item/relevant-search-wordpress-plugin/121503
plugin to search entire posts, blogs, forum, users
wordpress
I just wanna convert all links to no follow links which are being displayed in sidebar or footer or comments. How can i do this?
<code> wp_rel_nofollow() </code> does this for you. It is already called on <code> pre_comment_content </code> , so comments should be covered. For sidebars and footers, this depends on the widgets and other code you use there, but it should be possible to call that function there too.
How to convert all links to no follow links of particlular section of a webpage
wordpress
I am so happy that I found this site =) Well, here is my problem: I want to display the wp comments right after the post, but before the plugins content. What I have tried so far: in single-products.php file, the original code is: <code> &lt;?php the_content(); ?&gt; &lt;?php wp_link_pages(array('before' =&gt; '&lt;p&g...
For Five Star Rating , the FAQ tells me you can leave out the shortcode from your articles (you added these to each article?), and then use <code> echo five_star_rating_func('star') </code> somewhere in your template. So this is a nice example of a plugin that offers both options. For Simple Social , you need to disabl...
Display WordPress comments before the plugins?
wordpress
If someone comments on any post on my site, that comment gets displayed under another post. Moreover, if I login to my site. And click on logout link (under comment section) it redirects me to another article after log out. One possible reason as I read on many places, may be showing related posts. I am using following...
It sounds to me like you mucked up the query and the comment form thinks the user's on the wrong post. Try adding <code> wp_reset_query(); </code> to your theme right before your theme adds the comment form. If that doesn't work, do this: <code> wp_reset_query(); global $post, wp_query; $post = $wp_query-&gt;post; setu...
comments are coming on improper posts
wordpress
I'm just curious, because I love wordpress.
visit for demos http://wpmu.org/
Any amazing Wordpress MultiSite sites?
wordpress
I need a wordpress shopping cart that will produce 2 tier product variations. For example if you pick 'option 1' for a product, sub-options 'x' 'y' 'z' will be revealed and if you pick 'option 2', sub-options 'a' 'b' 'c' will be revealed. Im OK with a commercial cart, but I haven't found any that specifically list this...
The e-commerce plugin Shopp for Wordpress seems to allow 2-tier product variation options. It used to be a bit buggy in the 2-tier product variation department, but I think that they've fixed those issues with the plugin now. Keep in mind that Shopp isn't free, but in my opinion it's worth every dollar. MarketPress is ...
Wordpress shopping cart that supports 2 tier product variation options
wordpress
I want to add few custom fields to categories. So I am looking for something like <code> add_meta_box </code> but for categories. Is there any WP function like that for categories ?
You can add content to the category edit pages by hooking into the <code> edit_category_form_fields </code> (still in the form table) or <code> edit_category_form </code> (outside the table but before the submit button). Similar hooks exist for tags or custom taxonomies, check the source. To handle these extra values y...
anything like add_meta_box for categories?
wordpress
My WP query to fetch some custom posts should exclude private posts, but this query is returning all posts, not just public ones: <code> $wp_query = new WP_Query( 'post_type=listing&amp;post_status!=private&amp;posts_per_page=9&amp;meta_key=location_level1_value&amp;orderby=location_level1_value&amp;order=ASC&amp;paged...
I have to wonder if post_status=public would successfully exclude. That way it's just targeting the public posts.
Why can't I exclude private posts from this query?
wordpress