question stringlengths 0 34.8k | answer stringlengths 0 28.3k | title stringlengths 7 150 | forum_tag stringclasses 12
values |
|---|---|---|---|
I have attached several images to a post. When viewing the images in the theme, each image is linked to a larger version of itself. I would like to change this link to direct to a specific URL. However, when I change the URL under "Link URL" under attachment options, the link does not stick after clicking "Save All Cha... | You say you click the Save All Changes button. I think this means you are trying to edit the images via the Upload/Insert images button above the editor? It's confusing, but this is not the place to edit an individual image that you already inserted into the post. In the Gallery tab you can edit settings for the image ... | How can I customize the link when an attached image is clicked? | wordpress |
I want to use the latest jQuery (and jQuery UI) versions on my admin interface (editing a specific post type that I created). I tried this: <code> // jQuery 1.x wp_register_script('jquery1x', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, null, true); // jQuery UI 1.8.4 PTBR wp_register_script('j... | Starting with version 3.6 WordPress actively discourages from deregistering "critical" scripts in admin at all. For posed scope (loading newer jQuery in specific part of admin) it would make more sense to load custom copy of jQuery normally and use <code> noConflict() </code> on it right away to isolate it in own varia... | Use latest jQuery in WordPress (admin interface) | wordpress |
I have a WordPress custom post-type setup. I've created <code> single-[customposttype].php </code> However instead of displaying only the requested custom-post-type it goes to the URL, then displays all of the posts in the custom-type. Here's a copy of the code i'm currently using: <code> <?php query_posts("post_typ... | Just remove <code> query_posts("post_type=shorts"); </code> from your code. | WordPress custom post type Single.php? | wordpress |
I am trying to use the <code> orderby </code> parameter in the <code> get_children </code> function as below: <code> $navigation = get_children(array( 'post_parent' => $parent->ID, 'orderby' => 'menu_order' )); </code> But it is having no effect on the result; it is still ordering by the default creation date.... | Are you sure you need this specific function? Documentation (both Codex and inline) is verrry confusing. And it supposedly fetches things like attachments, which probably aren't relevant for navigation... Try this: <code> get_posts( array( 'post_type' => 'page', 'post_parent' => $parent->ID, 'orderby' => 'm... | get_children() Not Working with orderby Parameter | wordpress |
Can I host WordPress/WordPress MU installation on Microsoft's Azure cloud platform? Does anyone have any advice or experience hosting WordPress on Azure? | WordPress seems to be one of the poster children of PHP on Azure , so you can find many resources explaining how to install it . | Hosting WordPress on Azure? | wordpress |
Please at first let me explain my question. 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 <code> post-new.php?post_type=game </code> and u can see it's not the regular post for wordpress. I try to use this code from codex: <code> <?php if (is_page() ... | Add the 'post_type' parameter in your query args ( <code> 'post_type' => 'game' </code> ): <code> <?php if (is_page() ) { $category = get_post_meta($posts[0]->ID, 'category', true); } if ($category) { $cat = get_cat_ID($category); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $post_per_page =... | Wordpress: category page not for post's | wordpress |
I have created some custom widgets for my client to use, but I want to make them stand out amidst the fifteen or so standard widgets in the admin area. How can I do this? I have solved this problem myself and will place the solution here, but please feel free it add a better solution if you have one. | All widgets in the admin area get an <code> id </code> in the style <code> widget-[global_counter]_[widget_key]-[widget_id] </code> , like <code> widget-59_monkeyman_widget_shortcut-5 </code> (installed widget) or <code> widget-11_monkeyman_widget_shortcut-__i__ </code> (an uninstalled widget in the list). If your widg... | Highlight custom widgets in the admin area? | wordpress |
I have multiple "sidebars", but not all of them are the same size. Not all widgets fit in all sidebars (for example, I have a "footer sidebar" where the client can place custom widgets, but they are wide, and don't fit at all in the "real" sidebar). I want to give an indication when a widget is placed in a sidebar wher... | I solved it using some CSS, similar to my trick to stackexchange-url ("highlight my own widgets"). The sidebar drop areas are <code> div </code> 's with the class <code> widgets-sortable </code> and they have the <code> id </code> of your sidebar. Your widgets are <code> div </code> 's with class <code> widget </code> ... | Limit widget to certain sidebar? | wordpress |
I have created dynamic sidebars. They are working fine and appear in the Widgets area. However, I would like to customize the name that appears on each sidebar. So, right now each sidebar is named "Sidebar 1", "Sidebar 2", etc. Instead, I would like them to say something like "About Sidebar", "Toolkit Sidebar". This is... | Use the 'Name' parameter in your register_sidebar call. E.g., see the following code in the default Twenty Ten theme, line 351. <code> function twentyten_widgets_init() { // Area 1, located at the top of the sidebar. register_sidebar( array( 'name' => __( 'Primary Widget Area', 'twentyten' ), 'id' => 'primary-wid... | Changing name of sidebar widget | wordpress |
Ok, this is seriously weird and I have no clue what's going on here. I am using WordPress 3.0.1, I create a new blog post, give it a title, paste the following code into the blog post and hits Save Draft. <code> <code lang="php"> // Init curl $request = curl_init(); // Set request options curl_setopt_array($reque... | And of course after I ask the question, I find the solution... Apparently it's caused by a trigger happy Mod_Security. WordPress: 503 Service Temporarily Unavailable when Posting New Posts or Modifying Existing Posts Adding these lines to the .htaccess file makes it go away nicely: <code> <IfModule mod_security.c>... | Why does this snippet in a blog post make WordPress crash? | wordpress |
I have my multisite site up and running the main site is mikewills.me . The big problem I am having is performance. It can take several seconds before anything starts showing up. Obviously, this is unacceptable. I have seen some tips like adding <code> <?php flush(); ?> </code> to the header. I am using the the d... | I just ran your page through the NET console on Firebug just so I could see what was loading ... and wow ... you have a lot of things loading that don't need to be. From the looks of things, the following plug-ins are adding scripts and other collateral files to your load which are slowing things down: Fancybox for Wor... | Poor performance on multisite install | wordpress |
I have a function <code> get_images() </code> in which I would like to display all image attachments for the current post (or page) in a list with the last image having a <code> class="last" </code> attribute to mark it as the last image in the list. The code below is my first pass at getting the attached images to dis... | This should do it, I think: <code> function get_images() { global $post; $attachment = get_children(array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'numberposts' => -1 ), ARRAY_N ); if ( $attachment ) { $attachment_count = count($attachmen... | Display All Post Attachments and Assign Class to the Last Image? | wordpress |
( Moderators note: Was originally titled "wp_nav_menu Ancestor class without children in navigation structure") I have a <code> wp_nav_menu </code> in my header which had three pages in it. When I am on one of those pages, the <code> li </code> containing that page in the menu gets the class <code> .current_page_item <... | There's a simpler solution. Forget creating pages for each post type just so you can have nav items, because as you have learned, WP has no way of recognizing that the custom types you are browsing are related to that page. Instead, create a custom link in Appearance-> Menus. Just put the URL that will return your cust... | Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure? | wordpress |
Is it a problem to have a custom taxonomy and a custom post type use the same rewrite structure? I have a custom taxonomy <code> people </code> and a custom post type <code> people_bio </code> . The idea is that you get a list of posts about a person with a short biography on top of the page. I combine them in my <code... | Yes, this will give issues. The four rewrite rules that are generated by the custom taxonomy are also used by the custom post type. The one that you register first gets overwritten by the one that you register after that. Depending on the exact configuration (hierarchical vs. non-hierarchical) similar rules might end u... | Issues when rewrite rules collide? | wordpress |
I want to add new whole section of custom fields in admin UI of new post page edit post page Could somebody suggest any nice code example? | I think you'll find this a simple and useful tutorial to do what you want: http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/ | how to add custom fields into new & update post page? | wordpress |
I prefer using tags and have no interest in using the categories. All my posts now are labeled with a category named "Uncategorized" and I want to turn them off! I want no more categories at all. How can I do that? Please help! [Edit] I'm using <code> wordpress.com </code> , not <code> wordpress.org </code> | There is no way at all to remove the uncategorized category from a wordpress.com webblog. It's not even possible with a self hosted wordpress w/o extensively hack the theme and the core. The uncategorized category is a placeholder for a post not having any category. You can't even delete that category to not have any c... | How to totally get rid of Category in my blog? | wordpress |
I've been trying, without success, to remove to sliding of the text: "ggplot+background+grid+colour" From the left sidebar here Any suggestions on how to do this? | Almost missed it, looks fine in Opera. :) Basically these words are not treated as words, but as one giant word. And browsers (well, except Opera) have trouble interpreting how to wrap it. Not sure how to achieve nice wrapping, but quick fix would be adding CSS rule <code> overflow: hidden; </code> to <code> .side-widg... | why does this text overlaps in the sidebar? | wordpress |
( Moderator's note: Was originally titled "Wordpress for a static corporate website?") I am looking for a WordPress solution that will give me: a static website, with menu and a few pages, does not look like a blog, looks like a corporate website a very basic look and feel: white background, almost only text, easy to s... | Hi @tuscon : The rachatdecredit theme is almost certainly a custom theme, you can tell from the URL for the stylesheet. Most of the time if a theme is in a directory with the same name as the site it is custom, or at least a child theme: <code> http://www.rachatdecredit.net/wp-content/themes/rachatdecredit/style.css </... | Basic Theme for a Static Corporate Website? | wordpress |
I'm trying to build a fully W3C compatible blog. But I couldn't find a fully W3C compatible plugin. I want a simple plugin that provides share, tweet and like icons, sociable style. I don't want my readers to click a button to show share buttons, only buttons i want the plugin to provide. Any suggestions? | Best way is to skip plugin, add share buttons manually and then tweak. There is usually some degree of flexibility to share buttons code. But plugins generally disregard that and go for defaults. If you want it to validate perfectly you will likely have to do it button by button. | Is there any W3C compatible Share & Follow plugin? | wordpress |
We can order pages by title. Also we can sort them by menu_order. Is it possible, to order pages by menu_order and title at the same time? | Use <code> 'orderby' => 'title menu_order' </code> or <code> &orderby=title menu_order </code> (depending of the syntax you use for your query parameters). | Order by menu_order and title? | wordpress |
( Moderator's note: Was previously titled: "What is the best theme used for a developer like me?") I'm a developer and write a blog to share my knowledge with readers. I'm looking for a theme which is best suited with me but not sure which ones. Please share if you've ever visited a nice theme. | Related Questions As this is a community wiki question, I'll start to link related questions in the hope of use. Not a real answer so far but probably of help. Feel free to extend: stackexchange-url ("What theme is good for posting code?") | Recommended Themes for a Developer-related Topics Blog? | wordpress |
i know if you are on a category page..wp automatically ads <code> current-cat </code> class to the child of the parent category you are on. like <code> `<li class="cat-item cat-item-701 current-cat"><a href="http://goog.com/cat/subcat">Free Stuff</a> </li>` </code> how can i do this for a single... | <code> the_category() </code> uses <code> get_the_category_list() </code> to do its work, but this function gives you no way to specify classes. However, you can filter the output with the <code> the_category </code> hook. Since you know the format of the current category links, you can so a search and replace on them.... | add current-cat class to single post page | wordpress |
I tried using <code> <?php $my_id = 7; $post_id_7 = get_post($my_id); echo $post_id_7->post_content; ?> </code> based on the documentation here . The article I'm trying to retrieve has Short Code, which is picked up by a plugin on my site, and then formatted into HTML. The problem is when I output the post_con... | Post's object field contains raw content as it is stored in database. This should format it to how it appears when retrieved with template tags: <code> $content = apply_filters('the_content', $content); </code> This filters runs number of formatting functions, including shortcodes parsing. Something close to this: <cod... | How do you get formatted content of a post using the WordPress API? | wordpress |
Ubuntu Server, LAMP stack, freshly self-installed WordPress. Apparently I can't use <code> direct </code> filesystem access method because files are owned by different owners (WP core unpacked by me and files WP creates by <code> www-data </code> ). I tried my credentials for <code> ftp </code> method, but either somet... | Ideally, you install php-suexec, so that the php script runs as the file's owner. This allows the direct method to be used without requiring any permission changes. | How to configure WP filesystem access in Linux (Ubuntu Server)? | wordpress |
Basically exactly what the title says, I am running 3.0.1 and want to be able to quickly flag up posts that have no tags currently assigned to them. | I think this could get resource-intensive quickly, but fastest API way would be to create list of tags and query for posts that do not belong to any: <code> $tags = get_tags(); $ids = array(); foreach ( $tags as $tag ) $ids[] = $tag->term_id; $posts = get_posts( array( 'tag__not_in' => $ids ) ); </code> If you ha... | Is there a quick way to find out what posts haven't been tagged? | wordpress |
I'm developing a WP site that lists expensive properties (villas, penthouses, etc) for rent. My client has an agreement with certain schools to list some cheap properties exclusively for their students, and he has previously (in his hard-coded-by-hand html site) had a set username+password that he gives to the schools,... | This solution is purely cosmetic, in that it simply hides via jQuery the fields on the user profile page, but that effectively removes the ability for the user to change the password (admin will still see the fields, and can change any time). Add this to your theme's functions.php file, and you're done. <code> add_acti... | Restricted registrations or removing the ability to edit your password/email | wordpress |
I have registered a new taxonomy term using the same code on two different sites. On one site (a vanilla install), If I go to my taxonomy term in the admin menu, I see a 'slug' option for the add category screen. On my other site, with all plugins disabled, this slug option does not appear. Anyone know what might cause... | The value for global_terms_enabled for multisite is stored in wp_sitemeta http://wordpress.org/support/topic/plugin-edit-category-slug-wpmu-how-to-make-it-work-with-last-wpmu-30 I switched this to off and the category slug field reappears. If anyone can comment on whether its safe to switch this off, that would be grea... | Category slug field missing with registered custom taxonomy | wordpress |
I want to run an update script on pages that haven't been viewed and updated within X days. I'm using post meta to cache some related RSS feed data, and I want it updated once a week or two, but only if the page has actually been viewed within the last two or three weeks, bots included. Is there an internal counter or ... | Post views log/count is not available natively. It is resource-intensive (database writes are much more expensive than reads) and won't work (if done in pure PHP) with most caching plugins. There is number of plugins/services that offers Analytics via JS- or image-based tracking. Your best bet is to let such service ha... | How to find time last viewed? | wordpress |
I am using the "attach" feature in the media library to link a set of images to specific pages. Our custom theme displays these attached images in a particular way. We are setting up Wordpress as a CMS for a client and we don't want them to have to attach images to posts / pages this way because it feels clunky to be e... | Actually, it's very easy to attach images to posts and pages from directly within the editor. Just click on the Add an Image button (immediately to the right of Upload/Insert) to access the uploader. You can upload as many images as you want to the media gallery for that page and edit the meta information attributed to... | Is there a plugin to make attaching images easier? | wordpress |
I am trying to figure out how to change the default buttons on the TinyMCE editor in the Wordpress admin. Specifically, I would like to provide an 'insert table' button. How do I do that? | TinyMCE Advanced plugin. I almost never launch a site without it. | How to add 'Insert HTML Table' button to TinyMCE in admin? | wordpress |
I'm working on a site which needs to have pages and posts sorted into the same categories. The pages have their own individual hierarchy structure. Is there a way to do this using a custom taxonomy? | Yes, a custom taxonomy is the best way to achieve this. For a cat breeder site I’ve set a taxonomy for colors (in german: Farbe): <code> register_taxonomy( 'farbe', array( 'post', 'page' ), array( 'hierarchical' => false, 'label' => 'Farbe (Fell)', 'query_var' => 'farbe', 'rewrite' => array('slug' => 'fa... | Is there a way of storing posts and pages under the same hierarchy? | wordpress |
I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this This script: <code> jQuery(document).ready(function(){ $("ul.vimeo_desc_feed li a").click(function(){ alert($(this).attr('href')); return false; }) }); </code... | You can wrap your javascript inside a self-invoking function, then pass <code> jQuery </code> as an argument to it, using <code> $ </code> as the local variable name. For example: <code> (function($) { $(document).ready(function(){ $("ul.vimeo_desc_feed li a").click(function(){ alert($(this).attr('href')); return false... | $ not defined using jQuery in Wordpress | wordpress |
I don't know why the proper classes for menu item are not generated - all the elements in the tree which has subtree get only <code> menu-item menu-item-type-post_type </code> . The elements, which don't have children, get proper classes after being clicked (active). Link: http://lichens.ie/ Part of the menu structure:... | This is part of code in <code> _wp_menu_item_classes_by_context() </code> that handles current class for pages: <code> // if the menu item corresponds to the currently-queried post or taxonomy object } elseif ( $menu_item->object_id == $queried_object_id && ( ( ! empty( $home_page_id ) && 'post_type'... | wp_nav_menu doesn't generate parent/ancestor classes | wordpress |
( Moderators note: Was originally titled: "Custom post type problem?" ) I'm having some problems with custom post types where everything is working great except for the sidebars. Here is some code from my <code> sidebar.php </code> : <code> <?php if (is_home()) { dynamic_sidebar('frontpage-sidebar'); } if (is_single... | Hi @user1147 If I understand your question correctly then use are asking why <code> is_home() </code> is <code> false </code> when you are viewing the URL <code> /tools/example-tool/ </code> ? If I understand your question the answer is simply that is_home() is not <code> true </code> for Custom Post Types. Actually <c... | is_home() and is_single() Not Working as Expected with Custom Post Types? | wordpress |
I would like to be able to refresh the thumbnail cache programmatically, not sure where to hook it, but at present any design changes mean re-uploading loads of images! | You may want to look at the plugin Regenerate Thumbnails by Viper007Bond . Basically, this is how to do it: <code> function regenerateThumbnails() { $images = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_mime_type LIKE 'image/%'" ); foreach ( $images as $image ) { $id =... | Can I refresh the thumbnails programmatically? | wordpress |
The wordpress crop tool is greyed out for me in Firefox 3.6 (and IE7/8). I have disabled firefox add-ons and tried the solution here: stackexchange-url ("stackexchange-url But this hasn't resolved the issue. Anyone know how wordpress determines whether to enable the crop button? WP version is 3.0.1 thanks, | I'm 99% sure this was caused by the firephp plugin. | Wordpress crop tool greyed out | wordpress |
I'm using the built-in SimplePie, AKA <code> fetch_feed() </code> , to retrieve a feed, and I want to be able to adjust the cache time from an admin menu. SimplePie itself is well documented, but not so much the WordPress implementation of it. Any thoughts on the best way to set the cache duration? | Cache duration value (defaults to 43200 seconds) is set when feed object is generated and passed through <code> wp_feed_cache_transient_lifetime </code> filter with additional argument being feed URL. This allows to conveniently filter it both globally and for specific feeds. See fetch_feed() source for this and other ... | How to set the cache for the built-in SimplePie feed parser? | wordpress |
I am in the process of cleaning up a site after migrating it from a single install of WP to a multi-site install of WP. I have noticed many, many duplicate custom fields for each post. I assume this is from older versions of plugins that didn't check for the field before adding another. In the migration I am dropping t... | If you're not going to use those plugins, have at it. No reason to keep them around. Direct SQL query should be fine. Related: <code> add_post_meta() </code> has a nifty argument to prevent this very problem. The fourth argument is a boolean, declaring whether the meta should be singular: <code> add_post_meta( $post-&g... | Duplicate (or more) custom fields on many posts. Is there an easy way to clean them up? | wordpress |
I'm attempting to use wp_enqueue_script('jquery') to load the builtin WP jquery library but my jquery functions aren't working when I do this. Only when I hardcode a reference to the script do my functions work... Example that works... (this is inside my functions.php file, which is adding a dashboard widget)... <code>... | You need to enqueue your script at certain points. Rather than just placing the <code> wp_enqueue_script </code> call inside your dashboard widget function, you need to place it in a separate function and hook on to the proper action. So: <code> function add_jquery_to_my_widget() { wp_enqueue_script( 'jquery' ); } add_... | How can I load jquery library into my dashboard widget? | wordpress |
I have strange situation which just started which I seem to be unable to resolved. I am not sure what this might be related to but I think I remember reading somewhere that this has happened to someone else. Upon logging into WordPress then going into the menu management area, then clicking on "screen options" and enab... | I just figured out my own issue which I am hoping might help others if they get stuck in this situation. Essentially the problem seemed to be that modsecurity caused the 500 Internal Server error because for some reason (which I have yet to understand) the menu page was sending a bunch of data in the response body. To ... | How to fix strange 500 Error after Editing Menu? | wordpress |
I can get custom posts to display on my site. However, I want to filter the posts by category. The custom posts are displaying on this page: http://www.africanhealthleadership.org/resources/toolkit/ The custom posts are the tools i.e. Desk Research and Assessment Tool Under Preparation, I only want to show Desk Researc... | Can you be more specific?do you mean <code> custom post type </code> or <code> custom query </code> ? AFAIK when using custom post type you cannot directly use <code> category_name </code> since your post are treated in different way. You have to add custom taxonomies in register_post_type and then register them with r... | Displaying custom posts by category | wordpress |
I'm getting image fields wrapped in tags and would like to remove the surrounding divs, but only if they are of class "mceTemp". Anyone know of an efficient way to do this? Also, should those Divs even be there? | I agree with hakre - something funky is going on elsewhere, those shouldnt be appearing. As a sidenote, you could use the jQuery unwrap() function to remove those divs. <code> jQuery('div.mceTemp img').unwrap(); </code> http://api.jquery.com/unwrap/ | How can I remove using built in wordpress filters | wordpress |
( Moderator's note: This question was previously titled "How to add multiple custom page in wordpress" ) I am developing a WordPress site and right now I have a custom home page and others are default WordPress pages. Now I want to add one another custom page for some landing page. It will not be sub-page. This page's ... | Sounds like what you want is a Custom Page Template It's quite simple, if you want to call your layout "My Special Layout" just create a file in your Theme Directory calling it whatever you like (I'd call it "page-my-special-layout.php" but that's not required) and add the following comment to the top of the template f... | Assigning Multiple Layout Designs with Custom Pages in WordPress? | wordpress |
If you have a Tumblr blog, you can 'reblog' from other Tumblr blogs, much like a trackback. I follow a couple of Tumblr blogs and sometimes want to quote from those websites. And, on these Tumblr sites, there is a 'notes' section for each post listing each 'reblog'. So my question is: is there some WordPress plugin (or... | I just did a quick search on the Reblog concept because, admittedly, I've never used Tumblr and had no idea what you were talking about. After reading a bit about it, it started to sound very familiar ... Most blogs today allow you to add a ReTweet (Twitter), Like (Facebook), or Share This (Generic) button directly on ... | Reblog from Tumblr to Wordpress | wordpress |
Attempting to create a horizontal scroller using post_thumbnail's. I've made a filterable portfolio section using this tutorial: http://www.wearepixel8.com/blog/filterable-portfolio but my attempts to make it a horizontal scroller have failed, i've tried several different jQuery image scroller plugins to attempt it but... | I did it on a few sites. An example is below. If you want the jQuery code for it, I can give it you. It is a list of post thumbnails with their post titles shown below them. paragonhondainfo.com | Horizontal scroller with post_thumbnail's | wordpress |
Interesting situation i just ran into. I have a site I am developing in which I have defined specific image sizes I want created whenever a new image is uploaded. Currently lets just say that I defined a specific thumbnail size of 75x75 and a medium sized image of 150x150 pixels. Assuming we proceed to upload a new ima... | No, wordpress can not resize BMP files. Beware that it does not make sense to use BMP files in a website because a broad number of webbrowsers is not able to display them. Filetypes that are supported by Wordpress and which are widely supported by internet browsers are: GIF, JPG and PNG. Those formats are optimized for... | Can Wordpress resize BMP files? | wordpress |
Given the code below how would I account for the table prefix that can change from installation to installation? Is there a better way to write it than an SQL query? Is there a variable I've missed that provides the table prefix for times like this? <code> // setting posts with current date or older to draft if (!wp_ne... | You can rewrite the code like this: <code> // setting posts with current date or older to draft if (!wp_next_scheduled('sfn_expire_hook')){ wp_schedule_event( time(), 'hourly', 'sfn_expire_hook'); } add_action( 'sfn_expire_hook', 'sfn_show_expire'); function sfn_show_expire(){ global $wpdb; $server_time = date('mdy'); ... | Taking WordPress table prefixes into account | wordpress |
I get 404 status when fetching images, and the http still contains that image. Image shows up in a browser, but the 404 code breaks some applications. calls to wp-content/uploads/ are redirected in .htaccess: <code> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule... | Problem solved. The plugin "User Access Manager" was found guilty of inserting a .htaccess file into <code> wp-content/uploads/ </code> and not handling calls properly afterwards. I don't know how UAM plugin could be fixed, but It's ok to remove the .htaccess file. Nothing else depends on it. (at least in my case) | 404 when fetching image from wp-content/uploads/ | wordpress |
I'm trying out the SharDB plugin, but it doesn't seem to be respecting my CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE declarations -- it is querying <code> $shardb_prefix.users </code> instead of my custom table name. Anyone know if this plugin is supposed to support the CUSTOM_USER_TABLE definitions? Thanks! | Ok, looking into this, I found a little bug in the tables function (beginning on line 1088) in the db.php script file that comes with SharDB. It was this bit of code that was the problem (starting on line 1114 of db.php): <code> if ( isset( $tables['users'] ) ) { if( defined( 'CUSTOM_USER_TABLE' ) ) $pre_tables['users'... | custom user tables supported in SharDB plugin? | wordpress |
I was wondering if anyone could give me some suggestions on how best I could streamline the following; I have a WordPress blog (privately hosted) which I update daily (well, I normally schedule a load of updates at once) with pictures which I upload, tag and write a very brief comment on. I was originally considering a... | Hi @Toby : There are lots of ways to accomplish a daily picture blog so I'll just give you how I'd approach it. If I wanted to set up a photoblog on WordPress I'd start with a Flickr account and leverage it (or if you don't like Flickr for some reason you can also look at PhotoBucket, SmugMug, Picasa or one of the othe... | Automating a Daily Picture Blog? | wordpress |
What is a good plugin to do surveys for wordpress. I can think of creating a custom contact form 7 - but i was having problem in the formatting and separating it from the body of the post visually. and it doesn't store survey result in some document or spreadsheet, so eventually i'll have to track everything manually. ... | Have you try google docs ? you can embed their form as iframe which is easiest solution. | Survey plugin recommendations | wordpress |
Sorry for this complete newbie question, but I googled it and cannot find this simple information. I just installed Wordpress today. Right now all text on my Wordpress Blog is in English: "Home", "About", "Comments", etc. How can I change the language? Update: I am actually not out of the woods yet with this one. I hav... | See Installing WordPress in Your Language in the codex. | How to change language? | wordpress |
Hay, the example on the wp_get_archives documentation page shows how to show a list of all the posts, by months. However if there is no posts for a month, the month doesnt get displayed. So an example list could look like this <code> Janauary (5) March (1) April (1) ... </code> Is there a way to force the list to displ... | I've looked over code and it doesn't seem possible with this function. Months and their post counts are fetched with raw SQL query, for months without posts there are simply no records in database. It doesn't make effort to skip empty month, it simply doesn't get those from database. | wp_get_archives() display months even if there is no posts | wordpress |
So I wanted to play with some Linux-only PHP performance tools and installed Ubuntu Server 10.10 in VirtualBox (for the record I have little clue about Linux, never used it extensively). Turned out Ubuntu (Debian) has WordPress package that does some things differently then I am used to. I was especially puzzled with t... | The code you posted is to have multiple wp-config.php-style wordpress configuration files with one codebase. the configuration is then based on the domain name. imagine the localserver is listening on <code> http://localhost.localdomain/ </code> (no idea which one is the default with ubuntu), then the configuration fil... | WordPress package configuration in Ubuntu Server? | wordpress |
I have the following line to change my wp query slightly. The posts are by this ordered by the value in the custom field "wpfp_favorites". The value is allways an integer. Posts with value 0-9 is sorted correctly, but when a post has value 10 (or more i guess) its not listed above posts with 9. <code> query_posts('meta... | take a look here: http://codex.wordpress.org/Function_Reference/query_posts you need to change orderby=meta_value to orderby=meta_value_num -> than you value gets treated as an integer not a string! <code> query_posts('meta_key=wpfp_favorites&orderby=meta_value_num'); </code> i would pass an array instead of a stri... | orderby in query_posts | wordpress |
All tutorials I have found say to add your shortcodes to functions.php in your theme. I would like to break that away from my theme and put that in a plugin so I can share these shortcodes between my network of blogs. Is there a reference or tutorial on creating these shortcodes in a plugin? | Code in <code> functions.php </code> and plugins works in almost exactly same way (except than stage at which it is loaded and some plugin-specific hooks). Basically you just take your code out of <code> functions.php </code> , place it in plugin and it still works. It is good practice to use naming conventions and che... | How would I create a plugin for my shortcodes? | wordpress |
I've got a dashboard widget that pulls from an RSS feed on my central server and allows anyone using my theme to see newly available skins. Using the dashboard widget, I'm currently presenting a thumbnail image of the skin along with a description and a link to download. I'd like to enable the thumbnail so that when cl... | WordPress already ships with both jQuery and jQuery UI. Rather than including them manually, you can call them by using <code> wp_enqueue_script </code> . I'm personally a big fan of the jQuery UI Dialog setup (which also ships with WordPress) ... it should be easy enough to attach a click handler to your thumbnail suc... | Easy lightbox effect inside of dashboard widget | wordpress |
How can I change the Maximum upload file size? I would like to be able to upload 10Mb at a time. | This is due to the PHP limitations on file size uploads. If you have access to your php.ini file, you can modify the following lines: <code> upload_max_filesize = 10M post_max_size = 10M max_execution_time = 300 </code> If you don't have access to the php.ini file (such as a hosting situation), you may need to contact ... | How to increase the file size limit for media uploads? | wordpress |
I wish to create a feed of my blog which is a feed of two categories OR the feed of some tag and not the feed of some other category I know how to do "have a feed of this1 + this2 categories", but how do you do "OR" in a feed URL? (and in general, is more complex operators on the URL possible, and how?) Links that don'... | Feeds are essentially WordPress Loop with customized template. So it will take regular <code> query_posts() </code> arguments in URL. For example see <code> /wp-includes/feed-rss2.php </code> template. Since <code> query_posts() </code> doesn't handle OR logic you describe it isn't possible with URL alone. You will hav... | Custom WordPress Feeds operators? | wordpress |
Although I am very thankful to the wordpress core team that they have finally integrated native menu management capabilities I get frustrated with some key elements which I would like to change. I need a way of showing pages which is hierarchical in the same way hierarchical categories are displayed instead of being in... | I succeeded in this, but it is a mess. Basically, the walker should have the following parameters: <code> $this->db_fields['parent'] = 'post_parent'; $this->db_fields['id'] = 'ID'; </code> But, to get that in place, you need to rip out the existing metabox callback, copy it, change one line so you get an extra fi... | How to add a custom metabox to the Menu Management admin screen? | wordpress |
I am utilizing the following code which transforms any hierarchical page or custom post type with the ability to reorder the the pages through simple drag/drop. (also this code also adds a new display filter to hierarchical pages to make things simpler). The problem I need help with which currently does not work is bei... | Not really an answer, but perhaps the answer lies within this somewhere. I unpacked the navmenu js script, and stripped out what appeared to be the code which makes the drag/drop sortable nested nav items possible. It's not pretty. I don't think jQuery UI's dragable/sortable modules support nesting elements, and that's... | Help extending custom drag-drop page ordering on admin page list screen | wordpress |
hi i have wordpress and buddypress installed and i wanted to be able to search through forum posts, blog posts and other info all over the site. i found Search Engine (Wordpress Plugin) and installed it. after a brief indexing process i was able to perform all of my search requests but the problem is that when this plu... | I've solved it by using this tutorial: Creating The sitewide global/unified search Page for your Buddypress Theme (28 Apr 2010; Buddy Dev) | How to override normal Wordpress search in Buddypress? | wordpress |
I'd like to create a custom post type and add this as a child post of some but not all existing standard posts (which are not pages). Is this possible? Can I, for example, create a custom post type and then include this in other posts using a shortcode? Is there a better way to do this using custom taxonomies? | Is there a better way to do this using custom taxonomies? You're right on the money there. Rather than try to make a custom post into the child of a standard post (because you can't), I'd recommend using a custom taxonomy to order things. Essentially, you could build a custom hierarchical taxonomy and use it to "catego... | How can I combine posts of different types in one hierarchy? | wordpress |
I would like to add a button under my theme manager which shows a thumbnail listing of available skins (that did not ship with the theme when it was installed). I'd like to feed this listing from a file on a central server that I maintain. Looking for some advice on how to best implement this within WordPress. I will p... | Your best bet here would be a specialized RSS feed set up on your server. You could bundle a dashboard widget with your theme that automatically pulls this RSS feed and displays the thumbnails and a description of the new skins that are listed on your site. Step 1: RSS Feed First, decide what information you want to di... | Displaying Remote Data inside of Theme admin | wordpress |
I have a menu defined in WP Admin that looks like this: I want to be able to display all the child links on the sidebar whenever I am at a parent page. For example, if the user is on my "About Us" page, I want a list of the 4 links highlighted in green to appear on the sidebar. I looked at the documentation for wp_nav_... | This was still on my mind so I revisited it and put together this solution, that does not rely on context that much: <code> add_filter( 'wp_nav_menu_objects', 'submenu_limit', 10, 2 ); function submenu_limit( $items, $args ) { if ( empty( $args->submenu ) ) { return $items; } $ids = wp_filter_object_list( $items, ar... | Display a portion/ branch of the menu tree using wp_nav_menu() | wordpress |
I'm successfully using fetch_feed() to display an RSS feed inside a dashboard widget. However, I'm unable to load the thumbnail image from the items in the feed. I'm attempting to do it with the get_image_url() method, however, WordPress errors out on that method as an undefined method. Code is below... <code> function... | It's a method for completely different thing. RSS 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to have a “feed logo”, which is a single image to represent the feed. This method returns the notated URL for that image/logo file. <code> get_image_url() </code> And it complains about undefined because it is me... | How to enable thumbnails in RSS dashboard widget | wordpress |
I have been running a blog for a friend and over the last months she has been adding insane amounts of images taken directly from a DSLR. Each takes up around 5-6 MB so the site is now slow to load and is consuming large amounts of bandwidth and disk size. I was looking on the smush.it plugin, but it doesn't seem to do... | You need the bulk image resize utility: http://wordpress.org/extend/plugins/bulk-image-resize-utility/ I have used that numerous times and it does a fantastic job! | Resizing Uploading Images in Bulk? | wordpress |
I have built a query to select posts within a category. Works fine. But when I choose to add a secondary filter to exclude a category, the query return the same result set, as if the secondary category filter is being ignored. In the following the query should select all posts in category 7 and exclude those in categor... | I would use the built in API like Rarst mentioned. You could do something like this: <code> $just_seven = new WP_Query( array( 'category__in' => array( 7 ), 'category__not_in' => array( 10 ) ) ); </code> You would then have those items in <code> $just_seven->posts </code> . However, if you MUST use a direct SQ... | SQL query to select posts from multiple categories | wordpress |
I would like to add a custom write panel to a custom post type. I'm looking at the the code here: http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/ I can get the custom write panel to appear on a standard post edit page but not for my registered custom post type. <code> add_meta_box( 'i... | the fourth argument should be the name of the custom post type, as defined when you created the post type. see http://codex.wordpress.org/Function_Reference/add_meta_box For a clearer explanation of how to successfully create metaboxes, see this tutorial the second argument should be the callback function, you can crea... | How can I display a drop-down select of Post Names | wordpress |
How to get multiple menus in TwentyTen theme? | Hi @Himanshu Vyas : There are several steps to creating additional menus using the new menu system in WordPress in the TwentyTen theme or any WordPress theme (of which some of these steps can be done out of order) . In addition, I'm going to highly recommend you create a child theme based on TwentyTen instead of modify... | Creating Multiple Menus when using the TwentyTen Theme? | wordpress |
I've got a site ( this one ) with too many links in the blogroll. I want to keep them there, but to maybe have them "fold" in the menu (after some of them showing without the unfolding of the menu) Any solutions for that? Update: When I wrote "folding" I meant that, for (a rough) example, there would be a shuffling of ... | there is a plugin called "better blogroll" I guess it would help you do what you want . I had it installed on one of my sites, but site currently down , so can't really test - but as far as i remember it does the work u asking for http://www.dyers.org/blog/better-blogroll-widget-for-wordpress/ give it a look anyway and... | "Folding" links in the blogroll | wordpress |
Let's assume that I have the following posts with the following titles: PostA (is assigned to the 'category 1') PostX ( category 2 ) PostB (category 1) PostC ( category 1 ) PostD (category 1) PostY ( category 2 ) PostE (category 1) ... When a visitor will read the PostC, how can I display in the sidebar: Previous Posts... | The existing WordPress functions are only for displaying one previous or next post. I quickly wrote functions to display any number of posts. Paste the following in your theme functions.php file: <code> function custom_get_adjacent_posts( $in_same_cat = false, $previous = true, $limit = 2 ) { global $post, $wpdb; $op =... | Getting the Next and Previous Posts Titles in the Sidebar? | wordpress |
I knew about Atom-based dedicated servers, but these plug-class servers take it to whole new level of low-end extreme. Most of WordPress optimization talk is about surviving on shared hosting or scaling up. I got curious - how viable is it to run WordPress on such low-end, but dedicated hardware? At which point will CP... | I think it really breaks down to your traffic. The slower the hardware, the slower (the already slow) page generation. It's not specific to WP, it's the same for all large php scripts. If you get a server hit every now and then, as on a dev box or a family blog, it's no big deal. It'll just spit out pages more slowly. ... | Running WordPress on low-end hardware/resources? | wordpress |
( Moderators note: Title was originally "How can I add the "Page Attributes" and/or "Page Attributes > Template" selector to POSTS editor") WP currently only allows the assignment of a "template" to Pages (i.e. <code> post_type=='page' </code> .) I'd like to extend this functionality to Posts as well (i.e. <code> post_... | Hi Scott B: Hate to be the bearer of bad news but WordPress hardcodes the Page Template functionality to the "page" post type , at least in v3.0 (that might change in future versions but there's not a specific initiative I'm aware of to change it yet. So this is one of the very few times I'm struggling to figure out ho... | Adding Page Attributes Metabox and Page Templates to the Posts Edit Page? | wordpress |
For all the folders and files. Please give some explained answer. | All files should be writable only by your user account. So the correct permissions for files and directories are: Directories: 755 Files: 644 You may want to secure some files: wp-config.php: for maximum security, this file should be made writable by your user only or its group. This means 400 or 440 permission .htacce... | What is true chmod for WordPress? | wordpress |
I have started a new site ( here ), I want to add the theme a RSS icon/logo on the top right of the theme (like in this theme ). What is the best way for doing that? (PHP/CSS wise) | You want some code to be added to the <code> #title </code> element. You can do this, stackexchange-url ("as Sorich said"), by copying the <code> header.php </code> file and just adding it there, but you could also try to add it in the footer and then using Javascript move it to the correct element. This might survive ... | How to add an RSS logo to my blogs header? | wordpress |
( Moderator's note: post was originally entitled "Taxonomy.php title") How can I display the "Posts classified under:" title for the <code> taxonomy.php </code> page? For example, this code is used in <code> tag.php </code> : <code> printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', f... | Use: <code> $tax = $wp_query->get_queried_object(); printf( __( 'Posts classified under: %s', 'textdomain' ), '<span>' . $tax->name . '</span>' ); </code> | Displaying the Name of the Queried Taxonomy Term on a Term Archive Page? | wordpress |
We currently use wordpress to manage our website under our main domain. We also have a few subdomain under which different applications run. <code> www.example.com // our main website, running wordpress extranet.example.com // a custom-made LAMP application forum.example.com // another LAMP application *.example.com //... | This seems possible to me. Most of this is related to server management and not only WordPress, so probably Server Fault also has interesting info on this. On the DNS side, you would create a wildcard to the server with WordPress, and define your other subdomains to the servers that host those (some or all of them can ... | convert from single site to multisite (network) with existing subdomains | wordpress |
I have my WordPress site being hosted on a Windows provider and I am moving to another Windows provider. Any gotchas or instructions on how i can smoothly transition from one to another without losing any info? | Hi @ooo : Assuming you want to keep the same domain, it's really quite simple. Basically you copy the files using an FTP client by downloading from the old host and uploading to the new one, and then you copy the MySQL database by doing a database dump to a SQL script (this is your "export" ) and then running the scrip... | Migrating a WordPress site from One Hosting Provider to Another? | wordpress |
I have defined several page templates on my site http://178.21.128.82/ . When I set my pages to use one of these page templates, wordpress seems to stop treating it as a page: It is not accepted in the is_page() conditional tag The body class "page" is not present (instead its showing "home"). Only when I use the defau... | Thought so... You are using <code> query_posts() </code> and this nukes native page's loop and replaces all relevant data with your query. Since your query isn't for page - your page is no longer treated as such. Always use <code> get_posts() </code> or new <code> WP_Query </code> object for secondary loops. See stacke... | Custom page template, not acting as page | wordpress |
I am using Contact Form 7 on my website and would like to integrate Salesforce lead tracking with it. I was able to add a hidden field with my oid as suggested on this site But when I submit the contact form after adding this, it just gets stuck and never actually returns. As soon as I remove the hidden field, it start... | I've used the Gravity Forms plugin and its post form-submission hook to fire off a server-side web2lead curl request in wordpress before now. Wasn't too difficult. Essentially your web2lead form submission is purely server-side so the regular gravity forms entry logging (including IP etc...) just carries on working. Yo... | Salesforce lead tracking with contact forms plugins | wordpress |
Have this function : <code> class my_walker extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat("\t", $depth) : ''; $class_names = $value = ''; $classes = empty($item->classes) ? array() : (array) $item->classes; $classes[] = 'menu-... | Do you need to modify walker or hook into it unmodified? Since there is filter provided for that id, it is easy to hook into. Try this: <code> add_filter( 'nav_menu_item_id', 'modify_menu_item_id' ); function modify_menu_item_id( $text ) { static $myCounter; if( !isset( $myCounter ) ) $myCounter = 0; return 'menu-item-... | Applying my own css classes in wp_menus 3? | wordpress |
I'm looking for a solution that would enable me to publish a presentation inside WordPress. I do not want to attach a PPT file or embed a Flash plugin for that, I'm looking for a HTML solution. I would be preferable to be able to use PowerPoint to create the presentation but this is not a hard requirement, more importa... | I've run into this problem before with both PPT files and PDF documents. The solution, actually, was quite simple ... There's a plug-in called PDF and PPT Viewer that will uses Google Docs to render your presentation inside the page. Each slide/page is rendered as a image using Google's API rather than Flash or a nativ... | Publishing presentations in WordPress? | wordpress |
Is there a way to force SSL for all requests? Much like the option to use admin ssl, but for all requests, including the ones who are not logged in. | Here is a complete guide - Enable Complete support for SSL on Wordpress | Howto force SSL for all requests? | wordpress |
I want to have the authors listed like usual from <code> wp_list_authors() </code> but I know there are a couple of ones I would like to exclude from the list as well. Is there a way to do that? Thanks | It seems <code> wp_list_authors </code> does not have any filters , nor does <code> get_users_of_blog </code> , the function it uses to get the user list. So you either have to regex-and-replace the output yourself, or create a similar function with an extra parameter to specify authors to exclude. It's not too big, an... | How can I exclude specific authors from wp_list_authors | wordpress |
currently, I use CSS specificity to override plugin styles. I prefer this to editing the plugin as it makes for less headaches when you update. What would be nice is if my style sheet loaded after the plugins, so that I only have to be as specific, not more. This would make my stylesheets much prettier. | As you suggest, the most elegant approach is when your CSS overrides are loaded after the CSS injected by the plugins. This is quite easy to achieve - you just need to make sure that your <code> header.php </code> calls <code> wp_head() </code> before it references your style sheet: <code> <head> <!-- all the ... | best way to overide plugin CSS? | wordpress |
There is plenty of information on how to make the Read More function display different text in the Codex but what kind of filter would need to be used to make it display <code> <button class="readmorebtn" onclick(permalink)>Read More</button> </code> ? | The "(more...)" link gets filtered through <code> the_content_more_link </code> in <code> get_the_content() </code> . You can hook into this function and let it return whatever you want. <code> add_filter('the_content_more_link', 'more_button'); function more_button($more_link) { return '<button class="readmorebtn" ... | How to make a button? | wordpress |
Hey, there. I just got this site up and going. http://www.paledogstudios.com It works fine except for the fact I can't seem to see past comments (this blog was imported from blogger) or add comments. I know it's the code not the settings since someone else told me but he didn't help me further. He said it was probably ... | It appears that your posts titles do not link to the single post pages, they link to the archive page. By example, the lastest article "It really is that small" links to "http://www.paledogstudios.com/2010/10/04/". The error should be in your theme index.php file. | I can't view or add comments | wordpress |
I have a client that wants to use a particular theme without modification, but will likely want to have more widgets than are available with a given theme. Is there a way to add widgets to the list of those available without modifying the theme? Thanks. | Yes, you can add widgets through plug-ins the same way you add them through themes. So move the widget code from your <code> functions.php </code> file and drop it inside a custom plug-in. You'll get the same functionality without the need to modify your theme. | Add widgets to available widgets section without changing the theme? | wordpress |
I'm looking for a plugin which will allow me to count how many times a file has been downloaded. I don't need neither a fancy download page nor showing the download count on the page itself, I want it just for me. I'm aware that GA can track them but if the user right-click the link it might not detect it. | You want a plugin (or another piece of software) that tracks the actual server logs. If you don't need WordPress integration there are many options, AWStats is a classic for Apache and other server log formats. I don't know whether there are plugins that integrate nicely with WordPress (normalizing URLs to posts and st... | Plugin to count file download | wordpress |
I'm trying to create a custom post type that I can associate with parent posts (they are posts not pages). Wordpress is version 3.0.1. I was hoping to see a list of posts in a parent post drop-down under Page-Attributes but all I get its an 'Order' field. Have I missed something vital? <code> register_post_type( 'mytes... | This works for me. Looking at the code , the dropdown only appears if the post type is hierarchical (which is true in your case), and if there are other posts of the same type in the database. So a post can not be a child of another post type (a regular post or page for example), and the first new post of a type will n... | Parent drop-down not appearing for custom post type | wordpress |
I am using the menus API, and I want to switch to a different menu, but it is holding the first one for some reason Here is my code in functions.php <code> add_action( 'init', 'register_my_menus',10 ); function register_my_menus() { register_nav_menu('main-navigation', 'Main Navigation'); } </code> Here is the code in ... | _Menus are somewhat confusing around there. Try this: <code> $args = array( 'theme_location' => 'main-navigation', 'container_id' => 'navigation', 'fallback_cb' => 'wp_page_menu' ); wp_nav_menu($args); </code> <code> theme_location </code> tries to display menu that is attached to this location. <code> menu </... | Menu API not switching menus? | wordpress |
My pagination is only linking to the same posts that are on my front page. I have 3 posts on my front page, when I press next it goes to /page/2 but only shows the same 3 posts, with no previous button. The next button is still there, but still goes to page/1 Here is the full query. <code> <?php query_posts('post_ty... | Building off of what Rarst has said, I'm pretty sure the query string will retain 'paged' queries even if <code> WP_Query </code> strips it out as irrelevant. You could try replacing your query posts line with this: <code> global $query_string; parse_str( $query_string, $my_query_array ); $paged = ( isset( $my_query_ar... | Pagination resolving to first page only | wordpress |
Hay, i have a custom post type "Events", however this is basically a post type, so it inherits the post.php template page. Is there anyway to use a different template (i.e events.php) if the content type is an 'event'? | Try <code> single-events.php </code> . See Template Hierarchy in Codex for full scheme of templates. | display different template based on post type | wordpress |
I have a hierarchical taxonomy called 'tarefa' I have to display all posts from a child taxonomy. I used get_term_children function function to verify if the taxonomy parent has children. If the taxonomy parent has children I will query posts by taxonomy children. The problem is: I have to query posts by taxonomy slug ... | I have bit of trouble understanding your question. Taxonomy (like <code> category </code> ) slug or term (like <code> uncategorized </code> ) slug? <code> get_term_children() </code> works with terms so I will stick with that. Try this: <code> $term = get_term( $id, $taxonomy ); $slug = $term->slug; </code> | Get term SLUG by term ID | wordpress |
We're in the process of migrating a site from an existing CMS system into WordPress. The existing CMS system has no direct integration tools with WordPress. I'm looking into the option of creating my own script/application that will migrate the content between the two systems. Would it be better to migrate directly int... | If this is a standard CMS (not something you came up with yourself), I would say that a WXR solution is the way to go. It might take some extra work, but it will be a good learning experience and a nice way to build up your Wordpress skills. The WXR route will be an automated solution that's reliable and repeatable. Yo... | Is a direct or import approach safer for migration into WordPress? | wordpress |
Is anyone aware of any way to show statistics on your WP blog to show android market place downloads? For example, I create an application and host it on the android market place, it gets downloaded/installed 10 times. Is there any plugin I can use to display these figures/links etc on the sidebar in WP? | This plugin will display information from the Android Market, it may be able to be modified to include statistics, but I'm not sure. Otherwise, there are no existing plugins that do what you are asking. | Plugin for Android Marketplace downloads? | wordpress |
I have created a custom WP_Query as seen below. The query works well except for when $favorites is empty. When $favorites is empty, the query still outputs posts, which I don´t want. It could seem like it defaults back to the standard WP_Query to output all published posts. Anyone knows what´s going on? <code> $favorit... | Empty argument here does not equal logical in nothing . It equals no value to process and so WP ignores it and goes further as usual. Just wrap your query in <code> if( !empty( $favorites) ) </code> condition. | Custom WP_Query with no posts to output | wordpress |
I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, it doesn't bring up a post with that term. Example: http://dev.andrewnorcross.com/das/all-case-studies/ Search for term ... | I would recommend the Search Everything plugin too, but if you want to implement this using WP's search function, here's the code I'm using in my Atom theme: <code> // search all taxonomies, based on: http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23 function atom_search_where($wher... | Include custom taxonomy term in search | wordpress |
Does anybody know of any good publicly-available Wordpress training materials (videos, manuals, etc.) that could be used to give content editors a basic overview of Wordpress. We have a a handful of blogs on a Wordpress server and I'd really like to be able to automate training some more. | Interconnect/Spectacula folks manage free WordPress User Guide for training users. | User Training Materials | wordpress |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.