title: Using Taxonomy Image code with my get_categories code

text:
I'm using Taxonomy Images to associate images with categories. I'm using the following code, one is to display the categories, the other to display the images. Here is the code that displays my categories.               <?php     $cat_id = get_query_var('cat');     $catlist = get_categories('hide_empty=0&child_of=' . $cat_id);     echo "
";          foreach($catlist as $categories_item)     {     echo '
term_id ) . '" title="' . sprintf( __( "View all products in %s" ), $categories_item->name ) . '" ' . '>' . $categories_item->name.'
 ';         echo '
'. $categories_item->description . '
';     }     echo "
";     }     ?>      Here is the code that displays the images.               $terms = apply_filters( 'taxonomy-images-get-terms', '' );     if ( ! empty( $terms ) ) {              foreach( (array) $terms as $term ) {             print 'taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' );         }          }      If i put the image code above the foreach for the categories it will show the images above my categories. If i put the image code below the end of the foreach for the categories it will show the images below the categories. If i put the image code inside the foreach for the category it will show the all of the images under every category. So under the first category it will show the image for all categories and it will do the same under all of the other categories. How can i combine both pieces of code so it will display the category, the image associated with that category then the second category and the image associated with that category? I've tried the answer below but the image code doesn't work without the foreach $terms as $term, so i'm still stuck trying to do this.


title: Custom image sizes for custom field media uploads

text: Is it possible to resize my image uploads to different settings, depending on what custom field I'm on? I'm using wpalchemy, and have an image uploader for a heap of different custom fields. It would be great if I could detect which custom field I'm currently on, and have different dimension options. For example, if the custom field is my_special_image, I could stipulate 960x200px hard cropping, similar to featured posts.


title: How to add pages to feed?

text: I'd like to include Pages in my RSS feed. Whenever I add or edit a page, I'd like it to show up in the feed. I can't seem to find any setting in the default WordPress installation or in the default (TwentyTen) theme. Is there a theme or plugin which can do this? I'm using the latest version of WordPress (3.1.3).


title: post formats - where's the difference: "aside" vs. "status"?

text: As stated in a previous Q, i'm currently getting into post formats and what to do with them. After searching for quite a time through search results and a lot of blog posts, i realized that there's only pretty less written about **What to do with the different post format types?** Post Formats i'm unclear about what they represent:   * 1) asides - "twitter" style messages   * 2) status - "facebook" style messages  _Ad 1)_ When i look at facebook messages, then they contain nearly everything (links, images, status, chat, etc.), so currently it doesn't make much sense for me to see "asides" as facebook messages as every other post format would be a sub-post-format of "asides". _Ad 2)_ When i take the fact away, that facebook styled messages could contain content of all other post format types, and see "asides" only as representation of the message part, where is the difference to "status"? ### Questions: > Ad 1) **What is the intended usecase of "aside"?** and > Ad 2) **What is the difference between "aside" and "status"** _Note: I first thought the problem may be that english is not my mother tongue and translated it - with no result. I even translated my local wordpress install into my native language - with no result._


title: Static Front-Page Excerpts

text:
Working on a new site, I'm trying to plant recent post excerpts on a static front-page. I had been doing all my static content outside of wordpress (as static files), but was convinced to pull everything into the WP fold, so to speak. On my external static file that was serving as my home page, I had figured out how to include the blog header `<?php require('../wordpress/wp-blog- header.php'); ?>` and then call up posts on that page, and it worked like a charm:               <?php                              $count = 0;                          ?>                         <?php if ( have_posts() ) while ( have_posts() && $count <= 6 ) : the_post(); ?>

<a class="light" href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?>
                                             <?php twentyten_posted_on(); ?>

                                         <?php the_excerpt(); ?>
                                                                              <?php twentyten_posted_in(); ?>
                         <?php $count++; ?>                         <?php endwhile; // end of the loop. ?>      So, now, _I **have** set up a wordpress front-page template_, and it is being delivered dynamically, using the my theme header and this same chunk of the loop, I am getting not **_posts_** , but **_pages_** back. Instead of seeing a set of current posts, I get back some title info for the 3 wp pages currently on my site. I get that this is due to url query variables, but I'm not exactly clear how to get arround it. I tried manually calling up a `new WP-Query();` but that returned nothing at all. Tho I suspect that it may work, given the proper arguments... Any thoughts on how to pull in recent posts, instead of a list of pages, to a static front-page with this modified loop? Much appreciated -


title: How can you set maximum width for original images?

text: **Case:** I have a client that doesn't know much about the digital world. However what she does know is how to get the photo's from her camera on to the computer and in WordPress. However she doesn't know how to downsize the photo's to a normal size. **Solution:** I like WordPress to automatically downsize those photo's in the background to a maximum width of 1024px. **Problem:** Although I can set maximum width in the settings, I can set the $content_width and I can add new image sizes with 'add_image_size'. The original photo is still stored in the upload-folder in it's original size. Meaning the harddisk space will easily get full. **Question:** What should I put in functions.php to let WordPress downsize the original image (if it's larger then the maximum width)?


title: W3 Leverage browser caching not working for google pagespeed

text: I have a site at http://iqonline.eu which uses w3 total cache for all its caching and minifying purposes and everything is working nicely as per normal. However when checking the site on Google page speed it still says that leverage browser caching isn't being used and to extend the freshness time of certain media items. I have the following settings in the browser cache section, but regardless of the settings, it doesn't seem to affect the google page speed results? I am using a windows 2008 VPS server ( I know, I know...) is there anything i'm missing? ![screenshot of settings](http://i.stack.imgur.com/tmLPW.png)


title: multisite: use a virtual subfolder for subblogs

text: For our school, we use a wordpress network. The main domain gives access to general information and sub-sites are specific projects managed by students. I would like that all sub-sites have their url appended with a fake folder name. **example** Say the main domain is school.edu My sub-sites are               school.edu/project1/     school.edu/project2/      I would like that it becomes:               school.edu/projects/project1/     school.edu/projects/project2/      How can i do it? **UPDATE 1** I tried adding this rule to my .htaccess. It redirects correctly, but then the displayed URL doesn't stay the one i want, it reverts back to the original "real" url.               RewriteRule ^projects/([_0-9a-zA-Z-]+/)? $1 [R=301,L]


title: Individual Widgets per Page

text: In my (page-only, no posts) Wordpress site I have a number of static blobs in need to put in a sidebar. We could call/tream thoses 'blobs' as widgets. At least they'll have a fixed html content, like 'teaser1', 'teaser2', 'disclaimer', 'foo policy'... What I need, is to arrange them differently for every page. So this is not just about 'single' vs. 'archives', but truly 'product page A' vs. 'product page B' vs. 'about us' vs. 'terms of service'... I was thinking about custom meta boxes to turn them on and off on the individual editor page `wp-admin/post.php?post=196&action=edit`, but of course the drag-and-drop comfort and easy order determination of regular widgets would be even nicer. Also I am unsure how to maintain (add, remove, edit (html text view will do) those static snippets... It would be more intuitive for my users to have it on the individual edit page (`wp-admin/post.php?post=123&action=edit`) to check "I want widget 1,2,5,8" rather than going to the respective widget/snippet, telling him "You have to appear on the following pages" which I understand is the way Display Widgets works... So ideally I'd have a Widgets (or Modules or Snippets) preference page, where I can add/edit/delete widgets. And then on the individual edit page, a metabox on the right to add them and drag them into order.


title: Can I force all uploaded images to be reduced in quality?

text: There is a blog where high quality images (300KB at 800x550) are being uploaded and embedded at Full Size. Wordpress will just use the exact uploaded picture when you embed at Full Size. This makes total sense, but I'd like to override that and force it to generate and use a more optimised image. Is there a way to process these Full Size images to present a lower quality, say 70%? I don't want to resize them. Sob story below: I have a client who runs a very popular blog, with lots of photos on it. I've instructed them many times about saving at an appropriate quality for the web, but they have been "forgetting" for 6 months now. Yet they complain about their site being slow - hardly surprising when it has between 1 and 4 megs of 100% quality JPEGs on the page, which can easily be reduced to 100-200KB without any visible loss of quality. At this point I have to assume that they're never going to change their habits, so I'm trying to find an automated solution.


title: Using one media library for a multisite network with Wordpress 3.5 media library

text: I'm currently looking to modify Wordpress so that it always uses the primary site for images. I am achieving this using:               function use_main_blog_library()     {         echo "<script>alert('is happenin');</script>";         switch_to_blog(1);     }     add_action('load-media-new.php', 'use_main_blog_library');     add_action('load-media-upload.php', 'use_main_blog_library');     add_action('load-media.php', 'use_main_blog_library');     add_action('load-upload.php', 'use_main_blog_library');      Whilst this works for the old media library, it does not change the new media library. Is there any way I can set the new one (which I know is heavily reliant on JavaScript) to also use the primary library?


title: Use single-site install and map entities to subdomains

text: Not sure if this is a pipe-dream, but I am interested in the URL rewriting capabilities (and DNS mapping) of a single-site WordPress install. Typically in a WordPress MU setup, we'd use WordPress Mu Domain Mapping to map new sites/installs to a domain/CNAME. What I'd be after is if it's possible to map a single-entity, like a user to a CNAME on the registrar. For example, let's say we have a bunch of users in a single-site install. Ideally, these users would be accessed via `YOURSITE.COM/johndoe` (using `get_user_by()` which is an additional question). Then, on the registrar level, you setup a CNAME that has a value of `us.OURDOMAIN.COM` and point it to the IP address of the site. From there, WordPress is able to determine that `us.OURDOMAIN.COM` should load `YOURSITE.COM/johndoe`. Any initial thoughts on this would be greatly appreciated. Thanks as always!


title: After upgrading WordPress, can't access admin interface

text: After performing a WordPress upgrade to 3.3.1, I can no longer access the administration interface. The website works fine, but when I click on Dashboard, I receive the following error: **Fatal error** : Call to undefined function _wp_admin_html_begin() in **/home/a7938356/public_html/wp-admin/admin-header.php** on line **40** ... help! What can I do? I don't have a lot of content, so I could reinstall WordPress, but I'd like to know what went wrong and prevent it in the future. Website: http://www.stephenwade.me/   Current version: 3.3.1   Not sure what version I upgraded from.   Site hosting: http://www.000webhost.com/


title: Add meta tags with a plugin?

text: I've tried a number of plugins including Add Meta Tags and Meta SEO Pack which add a meta tag description to the home page. But my home page is static so the description is added to my blog page. I know I could add them manually but are there any plugins do this? Thanks


title: How to order by multiple date meta_values?

text: I am trying to find some way when using `WP_Query` of ordering by multiple meta_values. I know I can order by multiple values and I know how to order by meta_values but I cant seem to figure out how to do multiple meta_values. Is it possible ?


title: How to prepend text to the_content, but after img/shortcode

text: I was trying to add some text to the beginning of every post (the text comes from `post_meta`, but for this example let's assume it's static text). Here's what I tried:               add_filter('the_content', function($content)     {         return 'Text from meta - ' . $content;     });      However, if the post starts with a - usually floated - image (sometimes even wrapped in a caption shortcode), the added text will come before the image. I would like for the text to be prepended to the first paragraph in the post. Is there any way to accomplish this without parsing the full HTML?


title: Undefined index: ratings_score .../wp-postratings.php on line 994

text: Recently i activated debug mode on my wordpress blog and the following error occurred .                Notice: Undefined index: ratings_users in C:\wamp\...\wp-postratings.php on line 994      The code is :               if(is_null($post_ratings_data)) {         $post_ratings_data = get_post_custom($post_id);         **$post_ratings_users = intval($post_ratings_data['ratings_users'][0]);**         $post_ratings_score = intval($post_ratings_data['ratings_score'][0]);         $post_ratings_average = floatval($post_ratings_data['ratings_average'][0]);     }      Any Solution ?


title: sql select for post_title and a term name

text: I'm having trouble trying to think out this `SQL` select I need to write; here's the gist: I'm programmatically creating posts by importing an excel file, so I'm in 100% sure of post titles, etc, since I'm creating those that aren't found. I've got a few bits of data that I'm using for a lookup of a post before I create a new post: the post_title, that it is a post_type of 'team', and looking up it's term name in a 'term_type' taxonomy (ie 'College'). Here's the $args for a normal simplified taxonomy wp_query lookup:               $args = array('post_type'=>'team', 'post_title'=>$teamName, 'post_status'=>'publish', 'team_type'=>$type);      The trouble is of course that you can't do a lookup in this way with a post_title. Now I could create the select for that but I'm having trouble with the lookup of the joins -- the name in the terms, and with that the term_id to term_taxonomy_id in term_relationships giving me the object_id... I'm sure it's just lack of sleep. I'll probably just do a simple 'get_term_by' before I try my copy of the query that failed with a post_title lookup in addition, but my geek need to do it all in one go is pushing me to know the 'correct' way.


title: Disallow file edit not preventing plugin install

text: I have a little demo site (admin details are listed publicly), and I've configured the wp-config to disallow file edits, so in theory no one can install a theme / plugin.               define('DISALLOW_FILE_EDIT',true);     define('DISALLOW_FILE_MODS',true);      Yet lately I've noticed strange plugins & themes being installed on my demo site. I can see in the apache logs that they've been trying to access plugin- install.php but failing with a 500 error. The folder permissions are 755 on both plugins & themes, so the files can execute but only the user has write access. Does anyone know how they might be doing it / where I'm going wrong? Thanks


title: Migration Question

text: I am trying to figure out if I understand the migration process correctly for a very important migration I have planned.   1. I am currently hosting a clients site as an `Add On` domain on my personal account. **www.example.com**   2. I have created an account for them on my reseller WHM system using the same domain name. **www.example.com**   3. I have copied all of their files from the personal hosting account I have to my HD.   4. I am leaving their MySQL DB and MySQL DB User accounts alone in case anything goes wrong.   5. I have created a backup of their DB. Now as far as I understand it, all I have to do is the following:   1. Remove the `Add On` domain from my personal account. This will delete their folders on my server myaccount/public_html/example.com   2. Change the Nameserver to point to the new reseller account I created for them.   3. Transfer the copied files and folders to their account on the reseller system.   4. Import the DB to the new server.   5. Minor adjustments. Like the new DB name won't be mypersonalhostingaccount_dbname it will be newaccount_dbname and the password will need adjusting, etc. But this SHOULD make the site officially transfer without losing anything... and if something get's screwed up, theoretically I could just delete their new hosting account, re-initiate the `Add On` domain on my account, re-upload the files, and the site would be right back where it started? I'm just really concerned about losing anything... anyone care to chime in?


title: Displaying list of cities according to the selected state. Using the WordPress hook

text: I come to ask the community a help of a simple hook on WordPress. I'm trying to display a list of states and cities in two dropdows to select a single option in the a form. The list of cities will be displayed according to the selected state. But the dropdown of list city is returning the source code of site. I do not know why this is happening, so I ask the help. Here the code added in the Functions of theme:               <script type="text/javascript" src="http://prototypejs.org/assets/2008/9/29/prototype-1.6.0.3.js"></script>              <select name="state" id="state" onchange="loadCity(this)">              <option>-- Select the State --</option>                      <?php          global $wpdb;          //get the list of states          $list_of_state = ("SELECT DISTINCT meta_value FROM $wpdb->usermeta WHERE meta_key = 'state_acf_subscriber' ORDER BY meta_value ASC");          $option_of_state = mysql_query($list_of_state);          $total_of_state = mysql_num_rows($option_of_state);                      for($i = 0; $i < $total_of_state; $i++){                              $state = mysql_fetch_array($option_of_state);                                  if($city[meta_value] != ''){                                           echo "<option value=\"". $state['meta_value']."\">".$state['meta_value']."</option>";                              }                 }?>              </select>          <script type="text/javascript">     function loadCity(meta_value){          if(meta_value){         var myAjax = new Ajax.Updater('listCity','listcity.ajax.php',         {             method : 'get',         });     }     }     </script>               <div id="listCity"><label for="City">City: </label>              <select name="city" id="listOfCity">             <option value="">Select the City</option>         </select>     </div>      Here the another file:               <?php          global $wpdb;     //get the state selected on the dropdown of states     $state_selected = $_GET['meta_value'];          //below, get the list of city according the user's id what's are associated with state selected          $list_of_city = "SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = 'city_acf_subscriber'                  AND user_id IN (SELECT DISTINCT user_id FROM $wpdb->usermeta WHERE meta_key = 'state_acf_subscriber' AND meta_value = '".$state_selected."') ORDER BY meta_value";          $option_of_city = mysql_query($list_of_city);          $total_of_city = mysql_num_rows($option_of_city);          for($j = 0; $j < $total_of_city; $j++){          $city = mysql_fetch_array($option_of_city);          echo "<option value=\"". $city['meta_value']."\">" . $city['meta_value'] ."</option>";          }      The list of states is correct, the dropdown appears showing all states added by subscribers. I just can not view the list of cities Each user (subscriber) will select your state and city on your profile, and what I need is to be able to select the state and city to filter a list of users on the frontend. I appreciate any help.


title: Getting child content

text:
I am using the folowing to get child title and content. Each child has a gallery and a short code in the content editor in the content, but I only get the gallery and not shortcode. It isn't something to do with the short code but rather on the content as I tried to add some paragraph to the content after the gallery and it does not show up.               <?php $pages = get_pages('child_of='.$page->ID.'&sort_order=asc&number=3&sort_column=menu_order&parent='.$page->ID);     foreach($pages as $page) {         $content = $page->post_content;         $content = apply_filters('the_content', $content);     ?>

<a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?>
             <?php echo $content ?>
      I think `$content = apply_filters('the_content', $content);` is basically stripping out part of the content Any idea why the shortcode isn't showing?


title: front-page.php stylesheet

text: I've googled and googled but I can't seem to find out anything that's understandable to me... I want to have a static front page for my website, to this end I have created a `front-page.php` file in the active theme's folder in my FTP server. I notice any edits I do in `style.css` are not reflected in `front-page.php`. I want to have a separate stylesheet for my front page anyway, so how do I go about linking `front-page.php` to a custom `.css` file, let's say, `front- style.css`, so I can just edit the `.css` file to style the `.php` file? Or isn't this the right approach?


title: How do I make images appear in the beside blog post summaries?

text: I don't know if this is a WordPress question or a CSS question... On my blog, in the list of post summaries, an image from a post appears beside the post's summary in the list of posts. But that only happens with one post. Other posts have images, but no thumbnail image appears in the list of post summaries. I want to make it so that whenever I include an image or a video in a blog post, in the summary list, a thumbnail of the image appears. If I include more than one image in a blog post, then just one thumbnail appearing is ok. Ideally, clicking the image would click into the blog post. You can see the list of summaries at http://wordfruit.com/blog/ The one thumbnail is 11 posts from the top. Thanks,


title: Basic clothing showroom

text: I'm experimenting with Wordpress setups, and I'm curious if I can make some sort showroom advertising items for sale. Is there any how-to or documentation I can refer to?


title: Rewriting every url

text: I have a question regarding permalinks and rewriting url's. I am writing a translation plugin and I would like to add the language shortcode in my url (Something like http://eyewebz.com/EN/other_permalinks). Currently I am assigning a $_Session-variable to hold the current selected language, but this isn't really visible for the users. I am able to rewrite the url with the below code, but after altering the url, the page doesn't show any content and the global $post-variable is completely empty. Code is below.               function alter_link_language($permalink)     {         $active_language = get_user_selected_language();         $current_language_shortcode = strtoupper( $active_language["shortname"] );              $permalink = str_replace(get_bloginfo('home'), '', $permalink);         return get_bloginfo('home') . '/' . $current_language_shortcode . $permalink;     }     add_filter('post_link', 'alter_link_language', 10);     add_filter('page_link', 'alter_link_language', 10);      If anyone could help me on wy way with this one, it would be greatly appreciated! thanks in advance!


title: wp_login_form: Redirect to dynamic url according to username

text: i need to redirect users after login. I use `wp_login_form` to provide a login form on the frontpage. After a user entered username and password i'd like to redirect to a custom url, like http://myurl.com/username/ where 'username' is the name the user entered. Could i somehow filter `login_redirect`? Thank you!


title: Query posts by custom taxonomy ID

text: I have a custom post type called `portfolio` and a custom taxonomy called `build-type` (acting as categories) I am trying to query `portfolio` posts by `build-type` ID e.g. all Portfolio posts in "Hotels" (id=4 for that taxonomy)               // gets the ID from a custom field to show posts on a specific page        $buildType = get_post_meta($post->ID, 'build_type_id', true);     // run query     query_posts(array(          'post_type' => 'portfolio',         'showposts' => -1,         'tax_query' => array(             'taxonomy' => 'build-type',             'terms' => $buildType,             'field' => 'term_id'         ),         'orderby' => 'title',         'order' => 'ASC'     ));      Currently it's calling **all** `portfolio` posts and not just those with the `build-type` ID For `'field' => 'term_id'` should I be using `term_id`, `tag_ID`, `id` or something else? Anyone know how to get this working? Thanks in advance!


title: Custom Permalink Plugin and Current Page/Ancestor in Menus

text: I'm looking for a custom permalink plugin that is able to interact with menu classes. For instance, I have a menu that includes the parent `website.com/shop` as one of its list items. If a page, say `website.com/shop/product`, includes that menu, the list item for `website.com/shop` will get a class, something like `current-page-ancestor`. This is useful for styling that link so users know what section of the website they are on. But I will have pages whose parent will not be `website.com/shop` (a feature I can't change), but I want it to appear that `website.com/shop` is the parent. For instance, the page is `website.com/foo/product-2`. I'm currently using the Custom Permalinks plugin to change the permalink to `website.com/shop/product-2`. But in doing this, the menu does not recognize that `website.com/shop` is the parent, and no class is added to the menu's list item. Is there any workaround for this, or does anyone know of a custom permalinks plugin that would support menu ancestry? * * * Edit I feel like I'm right there, but missing one thing...               function getUrl() {           $url  = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://'.$_SERVER["SERVER_NAME"] :  'https://'.$_SERVER["SERVER_NAME"];           $url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":".$_SERVER["SERVER_PORT"] : "";           $url .= $_SERVER["REQUEST_URI"];           return $url;         }         function getDir($foo) {             $url = $foo;             $info = parse_url($url);             $dir = dirname($info["path"]);             return $dir;         }         function wpa83498_nav_class( $classes, $item ){             // if Shop is the current menu item being output             // and we're viewing a single product post type             $currentDirPath = getDir(getUrl());             if( ('Sales' == $item->title && is_singular( 'product' )) || (parse_url($item->url, PHP_URL_PATH) == $currentDirPath && is_singular( 'product' )) )                 $classes[] = 'current-page-ancestor';             return $classes;         }         add_filter( 'nav_menu_css_class', 'wpa83498_nav_class', 10, 2 );


title: Woocommerce checkout page custom checkbox ticked

text: iv created custom checkboxes in the checkout page through the functions.php file but i would like one of them to be ticked how do i do this ?               woocommerce_form_field( 'my_checkbox1', array(      'type' => 'checkbox',      'class' => array('input-checkbox'),      'label' => __('Standard Shipping (2–7 Days, FREE!) Most items are shipped FREE OF CHARGE within Thailand.'),      'required' => false,      'value'  => true,      ), $checkout->get_value( 'my_checkbox1' ));


title: Force wordpress to see uploads folder media

text: I uploaded the "uploads" folder to my wordpress install manually from a backup with the exact domain. All of the media properties for height and with are the same and they are all visible on the site. The only problem is that I can't see them in the media tab. Any fix for this?


title: I want to reset user's post meta after successfully login

text: I want to reset admin's meta value after login. It can be changed after login by admin via control panel, but I want to reset it after every login. I used this code but it's not working:               function reset_dismiss_message(){         update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', false );     }     add_action('wp_login', 'reset_dismiss_message');      I checked if and found it that the **get_current_user_id()** function is not returning user's ID as there is no data generated when wp_login action processing. So how can I do this?


title: How to enforce the selection of at least one term from a custom taxonomy?

text: I have a custom taxonomy, and would like to force the user to select at least one term from that taxonomy when creating a post in the WordPress admin back- end. Is this possible?


title: Wordpress: Can I add categories/tags to all sites in my network at once?

text: I've installed Wordpress 3.1.2, and have enabled the multi-site network. Each employee in my department can now have their own company blog. I was hoping to provide a bunch of pre-defined categories & tags for all the sites in the network for consistency between the blogs. It would be great if I could enter these once, and have them add to all the sites in the network. Is there a way to do this, or something similar? Many thanks, Glen


title: Hook into a function without a hook?

text: I have just got into using hooks and have now understand the beauty of them. I understand that I can hook into the following by using `add_filter('hook_name','my_hook_name', $variable);`               function a_function($variable){         return add_filter('hook_name', $variable);     }      But what if your the function you wanted to hook into simply returned a variable.               function a_function($variable){         return $variable     }      I don't have the `'hook_name'` to hook into anymore. So am I missing something? How can I edit that second function via my functions.php?


title: How to make multiple Column in archive Page?

text: I want to create multiple column on archive page but dont want duplicate posts please have look examples http://www.firstpost.com/category/business http://demos.gabfirethemes.com/advanced/category/technology/ i have seen "loop in action" (wp codex) but i want to create more then 4 loops please guide me


title: How can I apply filters in my class that extends Walker_Nav_Menu?

text:
I have the following piece of abridged code:               <?php      class New_Walker_Nav_Menu extends Walker_Nav_Menu {               function start_el(&$output, $item, $depth, $args) {         $attributes  = ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) .'"' : '';         $attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';         $output .= '
';         $output .= apply_filters( 'the_title', 'modifyTitle', $item->ID );         $output .= '
';     }     function modifyTitle($title){         return $title . asd;     }     }     ?>      Is this the right way to do it?


title: Uploading images in custom post form

text: I have custom form for posting in my theme file. I also need to upload photos(videos also but photos are more important now) and I prepared form using wp handle upload function. It's working, images are uploading but they're not inserting into the post. Please help me. Here is a code full http://cdpst.net/s8i5jsfuf and here is the relevant bit:               if ( $_POST['question_post'] == '1') {         $question_title = $_POST['question_title'];         $question_content = $_POST['question_content'];         $question_category = $_POST['cat'];         $question_tags = $_POST['question_tags'];              if ($_FILES) {             foreach ($_FILES as $file => $array) {                 $newupload = insert_attachment($file,$pid);                 // $newupload returns the attachment id of the file that                 // was just uploaded. Do whatever you want with that now.             }         }              // ...     }


title: How can I set up multi language admin ui?

text: I will have two admin users, one of them only speaking italian and the other only speaks english. How can I setup multi-language admin user interface?


title: Ajax page load in wordpress the right way?

text:
I tried something like the following but if the page I'm loading has javascript it's not running because the elements are created after page load. When the javascript is something I wrote I simply call the function again after load() and it's ok, but what can I do for the plugins the page has? Like contact forms etc? Whats is the correct way doing ajax calls in wordpress so as my rest javascript wont brake? Thanks!               $('#subpage_arrows a').live("click", function(){                $('.content_inside').wrap('
');           $('#ajax_content').css('height',$('.content_inside').height());                var toLoad = $(this).attr('href')+' .content_inside';                  $('.content_inside').fadeOut('fast',loadContent);                $('#load').remove();             $('#content').append('
Loading...
');             $('#load').fadeIn(900);             window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);             function loadContent() {                 $('#ajax_content').load(toLoad,'',showNewContent());           }             function showNewContent() {                 $('#ajax_content').hide().fadeIn(1000,hideLoader()).css('height','auto');                }                function hideLoader() {                 $('#load').fadeOut('normal');           }             return false;               });


title: How to deal with a GET variable of 'name'?

text: I'd like to have a custom registration confirmation page live within a WordPress site. I can provide a URL for this page to an external site. When the registration is successful the URL has several parameters, one of which is 'name' (which of course is a reserved word in WordPress) and a 404/page not found results. The URL (get variables are coming from an external site, so I have no control over them) is something like:               http://example.com/registration-complete/?UID=K2PRL04LFYFNPY9&name=John&PIN=408446&conferenceUID=BYNMY9GILMCJWOBG&role=PARTICIPANT      What is the best way to handle such a situation? I'd like to be able to use the 'name' value in the page, so I don't want to just discard. Thanks for any suggestions.


title: I'm hiding site with index.htm but now I can't get to index.php

text: I am trying to work on a new Wordpress-site on the web. I am 'hiding' the site by putting up index.htm in the home-directory so that visiters see this html with some text about 'maintenance' and not the Wordpress-site. But now if I go to www.example.com/index.php it redirects to www.example.com/ and shows the index.htm. I can't preview what I am doing in the admin. Is there anyway I can change Wordpress-settings so it won't redirect /index.php to /? Thanks in advance.


title: post_row_actions filter is not working while update post using quick edit

text: I have created two links using post_row_actions, it was displaying fine when page loads. But the links will get disappear after update post using quick- edit. Is it a bug from WordPress or did I miss something. My code will look like given below.               add_filter('post_row_actions', 'add_new_link', 10, 2);          public function add_new_link($actions, $page_object)     {         $actions['new_action'] = 'ID.'&action=new-action">New Action';          return $actions;     }      Thank you


title: Customer Support: TinyMCE stopped working (on some computers)

text: I'm sold on this one. A client has reported he can't edit any text on posts or pages on his WordPress site, claiming the visual editor text is white and he can't click on any buttons. Not even the HTML tab works. He sent me a screenshot where I can see his text is appearing on white (even with red markings from the spellchecker) and TinyMCE buttons are not loaded. He reports the same error using both the latest Firefox and Chrome and not using any browser extensions on Windows 7. I couldn't reproduce the error on my machine, since the site works fine for me both as an Administrator and as an Editor. Firebug Console also doesn't throw any errors at this point. I then walked him on the usual steps: clearing browser cache and cookies, logout/login, restart machine, update from 3.3.1 to 3.3.2, update plugins and deactivating them one by one (there's only 2 plugins: Contact Form 7 and the CF7 to DB extension). Installed TinyMCE Advanced. Gave him a fresh user to test. Nothing worked. I then disabled his visual editor, after which he got a working HTML editor. After re-enabling the visual editor, the problem was back. At this point, it is clear that the problem is not on the WP installation. However, as far as WordPress goes (see? not off-topic!), is there anything else I can try to force TinyMCE to work before sending his pc out to die alone in the rain?


title: Privileges problem with add_submenu_page

text: Im creating a plugin but I have a privileges problem. Here is my code:               add_action('admin_menu', 'add_quiniela_menu');               function add_quiniela_menu()     {         add_menu_page('Quiniela Game', 'Quiniela Game', 0, 'quiniela/quiniela_funcs.php', '', '');         add_submenu_page( 'quiniela/quiniela_funcs.php',             'Characters',              'Characters',              0,              'admin.php?page=quiniela/characters.php'         );          }      This adds a menu page called Quiniela Game, and I add a submenu page called Characters. When I click on "Characters" I get this error: > You do not have sufficient privileges to access this page Any idea how to fix it ? Thanks!


title: Wordpress pagination showing same posts on each page

text: I need to make adjustments to a horribly written WP theme that (a custom theme that was written in tables, and bad code). The theme has several custom templates, but pagination wasn't used and get_posts was used in place of query_posts -                   <?php query_posts('showposts=1'); ?>         <?php $posts = get_posts('numberposts=10&offset=0&category_name=albertsons, carrs, dominicks, genuardis, heb, kroger, pavillions, publix, randalls,safeway,shop-rite,tom-thumb,vons,whole-foods'); foreach ($posts as $post) : start_wp(); ?>         <?php static $count2 = 0; if ($count2 == "10") { break; } else { ?>          ...              <?php $count2++; } ?>         <?php endforeach; ?>      I need to get pagination to work with get_posts, or rewrite the function to use query_posts only, so that I can add `'paged' => get_query_var('page')` When I try to rewrite to only use query_posts, the whole damn thing breaks. Any thoughts on how to improve? Thanks UPDATE:               <?php      global $wp_query;          $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;               query_posts(array('posts_per_page' => '3','paged'=>$paged,'category_name'=>'albertsons, carrs, dominicks, genuardis, heb, kroger, pavillions, publix, randalls,safeway,shop-rite,tom-thumb,vons,whole-foods')); ?>                         ?>     <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>      Which works, but is not paginating. "Older posts" will reload the page with the url page-2, but the content is exactly the same - meaning the exact same posts are showing as on first page. Solved - needed to use


title: Wordpress custom taxonomy description for each post?

text: In a Wordpress blog, I'd like to put the term description of a specific custom taxonomy in the footer of each article. Is this possible? I've tried               <?php term_description( $term_id, $taxonomy ) ?>      but no luck. Unless I'm using it incorrectly? When used, nothing shows up.


title: PNG with transparent background turns black when uploaded and resized

text: Steps to reproduce:   1. Create a PNG-8 with a transparent background.   2. Upload to WordPress 3.3.1.   3. View original PNG in any browser, Chrome, Firefox, IE, etc. Notice that it retains transparency as it should.   4. View a resized version of that PNG in any browser. Observe that the transparent portions of the PNG are now black. Examples:   * Original uploaded image: http://me.mikelee.org/wp-content/uploads/icon-facebook-lg.png   * Resized version of the uploaded image: http://me.mikelee.org/wp-content/uploads/icon-facebook-lg-150x150.png This occurs even with a clean install of WordPress 3.3.1 with no plugins activated. Any ideas on what might be causing this bug? I've been searching all over this forum, the WordPress support forums, and anywhere else Google can find. All I see out there are mentions of a NextGEN Gallery plugin bug and the infamous IE6 PNG transparency bug, neither of which appear to pertain to this problem. Thanks in advance.


title: jQuery Tabs in Shortcode API

text: Pastebin of the html prototype and my attempt at the wp function -> http://pastebin.com/91zBv8sk I want a simple notation so its easy for new users to use. So something like this: [tabs] [tab title="tab title"]Content of the first tab[/tab] [tab title="second tab title"]Content of the second tab[/tab] [/tabs] I understand why the function's notation is wrong but I figured I'd leave my best attempt.


title: Adding an Archive of Posts to the Navigation Menu in WordPress 3.0

text: Hay all, I'm playing around with WordPress 3.0 and two (2) of the new features, _Custom Post Types_ and the _Menu Editor_. I've started off by creating a new post type called "`products`", as you've guessed, this list products. I'm using the bog standard template and I'm creating a new menu to replace the top nav. As far as I can see I can only add certain _"products"_ to it, I cannot add a _"archive"_ of products. What I'm trying to do is add a link to the menu to go to a page which lists ALL products. Any idea how to do this?


title: Change permalink in wp-property

text: I have set default property page so in the property url it shows /lima- investments/property-name. But I want to remove /lima-investments from the url. I want to change following url http://example.com/lima-investments/miraflores-apartment-for-rent-terrace/ to http://example.com/miraflores-apartment-for-rent-terrace/ Please help.


title: Implementing "Video of the Day" Feature?

text: I'd like to add a new area on a WordPress 3.0 site that **contains a new video from YouTube each day**. This video would be manually picked, and manually added each day. I'm not sure how to properly set this up though. My current thought-process is that I would create a category called " _videos_ ," and then add a new post in that category each day placing the embed code as the post-body. This seems like ugly hackery though, so I'm open to a better and more leaner solution. Ideally I would have a simple admin-side form where I would put in a title, and the link to the YouTube video (converting the link to an embed code on my own programmatically). Does WordPress 3.0 accomodate odd post types like this pretty well? What should I read to gain a better understanding of how I would accomplish things like _"video of the day"_ , and _"daily cartoons"_?


title: How do I transition multiple installations to a single Multisite installation?

text: I have a client who runs 8 different blogs, currently on 8 separate installations of WordPress. I'm trying to encourage them to move to a single MS installation instead to make it easier (mostly on me) to maintain the different sites, themes, and mix of plug-ins. Unfortunately, I shied away from MU for the longest time, and now I have no idea where to start with MS. I've used WP-Hive in the past because it allowed me to use multiple domains with one installation of WordPress (I don't like sub-folder blogs or sub- domains sites). This client project, if we go forward, will be a similar setup - multiple single-domain blogs hosted on a single WordPress installation. So what steps should I follow to   1. Set up Multisite - I know how to install it, but how should I configure it considering I want to use it for separate domains, not sub-folders or sub-domains?   2. Move content - I assume the regular WP export-import process will work?   3. Map the domains to their new home on the new installation?


title: How to Clear Empty Search values?

text: I have private pages in my website, so i have used this filter to hide some of the pages,               function mySearchFilter($query) {         if ($query->is_search) {             $excludeId = get_option('page_for_posts');             $query->set('post__not_in', array('267','287'));         }         return $query;     }     add_filter('pre_get_posts','mySearchFilter');      it's working perfectly but if i click empty search means it shows some default pages .. how to restrict the empty search? I tried this one and it's not working for me.                 add_filter( 'request', 'my_request_filter' );         function my_request_filter( $query_vars ) {             if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) {                 $query_vars['s'] = " ";             }             return $query_vars;         }      this is my search form                     <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">       <div>         <input type="text" class="search_text" name="s" id="s" value="<?php echo trim( get_search_query() ); ?>" />         <!--<input type="text" class="search_text" value="<?php the_search_query(); ?>" name="s" id="s" />-->         <input type="submit" id="searchsubmit" class="search_btn" value="" />            </div>     </form>


title: edit.php alter links

text: I want to alter the view of edit.php in the posts admin area. What I want is when a category is set ( $_GET['cat'], cat=x in the url ), add post would be post-new.php?cat=x. Is this possible? I know there is a sample code on wordpress answers that gives you this ability, but it does not alter the Add Post / Add Page link on the edit.php screen. I've managed to do this by hacking the edit.php myself, but normally in the next update all changes will be lost. here is a picture depicting what needs to be altered.... ![enter image description here](http://i.stack.imgur.com/RIyww.jpg)


title: Cannot get jQuery UI to enqueue in my plugin!

text: Not sure what I'm doing wrong, but I could use some help. My plugin architecture is below...               register_activation_hook(__FILE__, 'my_post_options_box');     add_action('admin_menu', 'my_post_options_box');          //enqueue jquery ui here     function my_load_js() {         echo "called"; //THIS ECHO FIRES         wp_enqueue_script('jquery');         wp_enqueue_script('jquery-ui-core');         wp_enqueue_script('jquery-ui-widget');         }          function my_post_options_box() {         add_action( 'admin_init', 'my_load_js' );//DOES NOT LOAD THE .JS         $my_dir = plugins_url('/img', __FILE__);         add_options_page( '...my options page settings here');         register_setting( 'my_settings_options', 'my_settings', 'my_settings_validate' );     }      Not sure what I'm doing wrong but when I view the source of the page in which the plugin is loaded, there is no .js file loaded for the jquery ui files I'm trying to enqueue


title: Using PHP to toggle stylesheet and header image, set in cookie

text: I haven't done a lot of work with cookies or Wordpress before so I think I've been a bit over-optimistic in my quest :p I have created two themes for my site, night and day. I would like the user to be able to choose which theme they'd like from a php-enabled text widget in the sidebar, which will then set a cookie with their choice, change to the appropriate stylesheet (style.css for night, the default, and style1.css for day), and load in a new header image. I have the functionality -sort of- in place here, http://somethingoriginal.net, however the cookie does not appear to be setting immediately in Chrome as I had expcted, the echo statements I've used to print out variables for testing don't seem to be consistent, it takes a few clicks and then eventually changes, but the header image does not budge at all. In Firefox it sometimes appends a backslash to the end of my URL and this sends the user to a "not found" page. I have no idea what it does in IE. I'm just wondering what I need to do to improve functionality? I don't -need- this, I just would like to try and implement it as I've made the two images :) PHP sidebar text widget:                   getStyles();              if (isset($_COOKIE["chosenStyle"]))         echo "Your current theme is ".$_COOKIE["chosenStyle"].", enjoy!";              else if (isset($_POST['styles']))         echo  "Your current theme is". $_POST['styles'].", enjoy!";              else         echo "Your current theme is night, enjoy!";         ?>      **EDIT: I have now updated my functions/header files and included the new code after reading thishttp://stackoverflow.com/questions/5936054/php-set-cookie- issue. The page CSS now updated automatically, I jsut need to change my text widget to reflect the choice. I am still having the header issue however** Functions.php file               function setDayHeader(){              //Set header to day header              $args = array(              'width'         => 1000,              'height'        => 288,              'default-image' => get_template_directory_uri() . '/images/headers/SomethingOriginalSun.png',              );             add_theme_support( 'custom-header', $args );         }          function setNightHeader(){              $args = array(              'width'         => 1000,              'height'        => 288,              'default-image' => get_template_directory_uri() . '/images/headers/SomethingOriginalTheMoonAndStars.png',              );              add_theme_support( 'custom-header', $args );            }               function getStyles() {     echo '<form method="post" class="styles" name="styles" action="\">             <select name="styles">             <option value="night">Night</option>             <option value="day">Day</option>             </select>             <button class="submit" name="userStyleChoiceForm" onclick="submit">Set style</button></form>';     }              //Set a cookie for the stylesheet            if (isset($_POST["styles"])) {              $chosenStyle = ($_POST["styles"]);              setcookie("chosenStyle", $chosenStyle ,time()+31536000, "");             echo "I have set a cookie with the value ".$_COOKIE["chosenStyle"];          }      Header.php                  <!-- if cookie is set, check here and then change style sheet based on cookie -->     <?php     if (!(isset($_POST["styles"]))) { //if post not set (first visit)              if (!(isset($_COOKIE["chosenStyle"])) || ($_COOKIE["chosenStyle"]) == "night") { //if cookie not set, or is night theme ?>              <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />              <?php                 setNightHeader();         }         else { //cookie must be set to day theme, use day ?>              <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style1.css" type="text/css">              <?php                 setDayHeader();         }     }          else { //if post is set               if (($_POST["styles"]) == "day") { //if they have chosen the day theme ?>              <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style1.css" type="text/css"> <?php         }              else if($_POST["styles"] == "night") { //if they have chsoen the night theme ?>          <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />  <?php         }         } ?>      I tried to set the cookie in the header.php file however I then got the 'modify headers' error :| I'm not 100% sure if I'm even referencing the right $_POST variables, and have tried combining a number of tutorials I've found, so any help would be appreciated! I realise I'm working off my main site at the minute but it's not quite 'launched' yet anyway, although I'm hoping to create a dummy/test WP site soon so I can do all this testing elsewhere. Thanks


title: Did upgrading from 3.3 to 3.3.1 introduce breaking changes in the menu navigation?

text:
I have a WP 3.3.0 site running in production. (version.php says `$wp_version = '3.3';`) I have a main menu using WP's built-in functionality. I use               wp_nav_menu(array( 'container_class' => 'menu-header', 'theme_location' => 'primary'));       I made a copy of that site, installed it in a different location, and ran an update to 3.3.1. This broke the blog's navigation: The CSS styles were no longer applied. I quickly found out why. What previously looked like so:

       ....
        ....

      Now looks like so:

         ....
           ....

      ~~Now I totally agree this is a change that improves semantics and all, but do I really have to expect breaking changes from a "stability and maintenance update" - especially changes that aren't even mentioned inthe announcement? That would mean a frontend expert would have to be standing by to put out fires every time a minor update comes out, and that would _really_ stink. ~~ > **Edit:** I just checked the `nav-menu-template.php` on the updated (faulty) > install and it contains no reference to submenus getting a `child` class. > Also the diff for the file shows no breaking changes were made. I'm > completely confused where this comes from, will investigate further.


title: How to redirect just one or two blog posts correctly?

text: I've read a lot about redirecting and also checked out previous questions here, but NONE could answer my question. I think the problem is that I just don't understand the difference between the different redirection methods and thus don't know which one to choose in my situation and how to implement it. I'm really sorry, but I just don't understand all the terms although I tried! :( I was of the impression that 301 redirects are the best solution, especially also good for SEO. There is a plugin that will do that for me, called "Redirection". What I want to do is to change the URL of just a few of my blog posts for SEO reasons (e.g. the URL didn't contain the keyword). I don't want to change the permalink structure or change the whole domain! Would 301 redirection be the correct way in my case? Should I use a plugin in that case or can I easily to that by modifying my htaccess file?


title: Buddypress - Add activity scope

text: I was searching in documentation and online but it never mensioned anywhere. I want to add custom activity scope. For example here are: All members, My friends, My groups, My favorites, Mensions. http://s020.radikal.ru/i720/1402/03/bfc6b5c9a3ba.png Like here, on profile I see "personal, Mensions, Favorite". this is a place where I want my new menu (sorting) to appear Now I want to add 'Whats hot'. So this won't be just a object to filter, but instead it should use some smart processing to generate output. The output will be activity sorting based on activity_meta and activity date So I have setup my component for buddypress but can find anything. Do you have anything to show me some starting point? Maybe some tutorial? or code to read inside core? anything should go and in the end I'll post everything back


title: How to use rgba color from theme customizer color picker

text: I'm creating a wordpress theme and in that I am using the theme customizer to allow users to change the accent color of my theme. Now everything is working fine but few of my elements need to have the color in rgba() and not hexadecimal. I've searched around and found that there is no way to make the customizer color picker work with rgba(), but I've seen many themes allow that and would like to know how I can do it too, but I just kind a solution anywhere. Please let me know if you know how to do this. Thank you very much and best regards. This is the part of my code in which I assign the value I get from the color picker to the anchor tag.               wp.customize( 'tcx_link_color', function( value ) {         value.bind( function( to ) {             $( 'a' ).css( 'color', to );         } );     });


title: Autoupdate shows current when I'm on 3.1

text: My host has Fantastico set to install version 3.1. But when I go to Dashboard/Updates, it says "You have the latest version of WordPress." I clicked "Check again" and it says: Last checked on August 5, 2013 at 5:07 am. Why won't it detect 3.5 or 3.6? Is this related to my hosting company? Or is it checking directly to WordPress site?


title: Echo string and function?

text: I'm trying to get "string of text: Edit" `<?php echo 'string of text: ' . edit_post_link( 'Edit' ); ?>` but this outputs "Edit string of text:" How do I make it appear in the correct order? "string of text: Edit"


title: Restrict Admin Capabilities in MultiSite

text: update_core         update_plugins         update_themes         install_plugins         install_themes         delete_themes         edit_plugins         edit_themes      Hi, I want to restrict those capabilities to user_id = 1 so other super admins cant edit network files. (Btw if i am missing something, let me know). What is proper way of this? Tried http://wordpress.org/extend/plugins/extended-super- admins/ but it adds 'manage_esa_options' cap to every blog so super_admins see tons of blogs in their admin bar..


title: Rewrite / Mask URL of Auto Generated Page

text: I am using an old unsupported Wordpress plugin (Tan Tan Noodles) that pulls in a photo sets from flickr and auto generates a html page in Wordpress. A resulting URL would be: http://theartistree.fm/photos/album/72157638386477733/phantogram- terminal-5.html Is there any possibility of rewriting the urls so they are shorter? Or possibly masking the URL with a shorter one? ex. http://theartistree.fm/photos/phantogram-terminal-5.html Any help would be appreciated -c


title: Custom taxonomy [year] is directing to yearly archive

text:
My custom taxonomy is linking to yearly archive instead of the post linked to it. I have created a custom taxonomy named "year" containing int (i.e 2008,2009,2010 etc). Have registered the custom taxonomy using the following code.               // Add new "Years" taxonomy to Posts     register_taxonomy('year', 'post', array(     // Hierarchical taxonomy (like categories)     'hierarchical' => true,     // This array of options controls the labels displayed in the WordPress Admin UI     'labels' => array(             'name' => _x( 'Year', 'taxonomy general name' ),             'singular_name' => _x( 'Year', 'taxonomy singular name' ),             'search_items' =>  __( 'Search Years' ),             'all_items' => __( 'All Years' ),             'parent_item' => __( 'Parent Year' ),             'parent_item_colon' => __( 'Parent Year:' ),             'edit_item' => __( 'Edit Year' ),             'update_item' => __( 'Update Year' ),             'add_new_item' => __( 'Add New Year' ),             'new_item_name' => __( 'New Year Name' ),             'menu_name' => __( 'Years' ),         ),         // Control the slugs used for this taxonomy         'rewrite' => array(             'slug' => 'Years', // This controls the base slug that will display before each term             'with_front' => false, // Don't display the category base before "/Years/"             'hierarchical' => true // This will allow URL's like "/Years/boston/cambridge/"         ),     ));      and echoed the year taxonomy under post using the following line.               <?php echo get_the_term_list( $post->ID, 'year', '
', '

', '
' ); ?>      I have registered two other taxonomies "player" and "team" in the same manner which are working perfectly. Any help in this regard will be appreciated.


title: Add "parent" class to parent menu items

text: Is there a good way to add a class of "parent" to list items that have children using wp_nav_menu? I've found a couple of solutions online but non seem to have the desired effect.


title: how to customize WP 3.8 themes.php screen

text: I've been digging around on Google and looking at themes.php for clues - but I've drawn a blank. I'd like to customize the themes.php screen via a plugin in 2 relatively simple ways for a device theme switcher system:   * indicate which theme is being used for which device - for example with a simple label on relevant themes   * add additional information to the "theme details" popup window - which is currently loaded in via a template inside themes.php Anyone done this before or have any pointers?


title: How to give the same error message when the wrong password or wrong username is used?

text: For security reasons, my WordPress instance should give the same error message when an incorrect password or wrong username is used. How can it be done?


title: How do I search dynamically created content?

text: As you know Wordpress only searches post_content and the_title by default and with a plugin you can get it to search custom meta fields and other things. Thats great and all, but what do you go about content on the page thats not in a meta box or the content field, how do you make that searchable? Is there a way to insert the dynamic content into post_content so that its searchable? Is there a better way? Any suggestions? Update: I'm scraping data from a 3rd party website and including it on the page via php in the template. It's on the single post.


title: What is the most efficient way to have two "blogs" on one site?

text: **What I want:** Two wordpress blogs with separate cats and tags               reggi.com/portfolio/category/example     reggi.com/blog/category/example     reggi.com/portfolio/tags/example     reggi.com/blog/tags/example      Site root to not be wordpress or to be a static page with custom template               reggi.com/ <-- NOT wordpress     reggi.com/portfolio <-- wordpress     reggi.com/blog <-- wordpress      One theme directory **What I have tried so far:** I have installed one wordpress theme in the root `reggi.com` and had a plugin which removed `category` from `reggi.com/category/portfolio`. This worked but my permalink structure was really sluggish as for each post was queried first with `%category%`. I also ran into problems with the tags where it was skipping over the category in the url and displaying something like `reggi.com/tags/example` rather than `reggi.com/portfolio/tags/example`. I have installed multisite but I am running into problems where I need to display different indexes for `/portfolio` and `/blog` I am thinking my only option would be to have the template index look at the url and if it is `/blog` or `/portfolio` display the respective themes accordingly. Is this wise? I don't know how to setup `/blog` with multisite post here. Are there any other ways to go about this? Something I'm missing? Should I just have two separate wordpress installs?


title: Search Result from another wordpress website

text: I am wondering, is it possible to get the search result from Website A and display it to Website B, assuming that both websites are not part of multisite?


title: How to cache wp_query with pagination using transients?

text: I have seen examples where there is a fix number of posts to be queried; however, I cant find an example when using pagination. I am trying to figure out how to use transients to cache a WP_Query with paging. So far, I am showing 12 posts per page. When I load the next set of posts, the posts are the same first 12 posts. It is not getting the following posts.


title: Plugin activation hook in an abstract class

text: I would like to create a common abstract class to use for every WordPress plugin that I develop. As a part of the class' initiation process, I would like to fire the activation hook which calls an abstract method that will be defined by the child's class. For example:               abstract class AbstractPlugin extends WP_Plugin {         public function init() {             register_activation_hook( __FILE__, array( $this, 'on_activation' ) );             register_deactivation_hook( __FILE__, array( $this, 'on_deactivation' ) );         }              public abstract function on_activation();         public abstract function on_deactivation();     }      However, the first argument in `register_activation_hook` should be the path to the file in which the child's class is defined, which is unknown, and even if it is known, it doesn't work. Is there any way to get around this issue?


title: Extensible code

text: I would like to write this piece of code in an extendible way.               $my_item = array(     'post_title' => $item->get_title(),     'post_content' => '',     'post_status' => 'publish',     'post_excerpt' => $item->get_description(),     'post_type' => 'post'     );                    If I use this in a plugin I would like to be able to create another plugin that can change that array and give different values or parameters. How can I do that?


title: Remove unusable metaboxes in nav menu management screen

text: When you visit `wp-admin/nav-menus.php` and there is no menu you get a set of metaboxes you cannot use. The only thing they do is drawing attention away from the _Create Menu_ dialog. ![enter image description here](http://i.stack.imgur.com/dX6Wu.png) I want to hide those boxes until there is a menu. ![enter image description here](http://i.stack.imgur.com/Q6Eci.png) How can I do that?


title: Custom Post Type page template doesn't show up

text:
I created a custom post type called portfolio. I also created a file called single-portfolio.php to display the portfolio content. When creating a portfolio post, the template I want to use doesn't show up in the dropdown list under the Attributes section. In fact, the dropdown list doesn't show up at all until I create my first portfolio post, at which point, the dropdown list is populated with two items: -(no parent) -[Title of the first Portfolio post] Here's what's in functions.php               add_action('init', 'create_portfolio');     function create_portfolio() {     $labels = array(         'name' => _x('My Portfolio', 'post type general name'),         'singular_name' => _x('Portfolio Item', 'post type singular name'),         'add_new' => _x('Add New', 'portfolio item'),         'add_new_item' => __('Add New Portfolio Item'),         'edit_item' => __('Edit Portfolio Item'),         'new_item' => __('New Portfolio Item'),         'view_item' => __('View Portfolio Item'),         'search_items' => __('Search Portfolio'),         'not_found' =>  __('Nothing found'),         'not_found_in_trash' => __('Nothing found in Trash'),         'parent_item_colon' => ''     );     $portfolio_args = array(         'labels' => $labels,         'label' => __('Portfolio'),         'singular_label' => __('Portfolio'),         'public' => true,         'show_ui' => true,         'capability_type' => 'post',         'hierarchical' => true,         'has_archive' => true,         'rewrite' => array("slug" => "portfolio"),         'can_export' => true,         'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'page-attributes')        );     register_post_type('portfolio',$portfolio_args);     }      And single-portfolio.php               <?php     /*     Template Name: Single Portfolio     */     ?>     <?php get_header(); ?>
     <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 10));      ?>     <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>     <?php            $custom = get_post_custom($post->ID);         $screenshot_url = $custom["screenshot_url"][0];         $website_url = $custom["website_url"][0];         $date_completed = $custom["date_completed"][0];     ?>

<?php the_title(); ?>
     <?php echo 'Completed:'; $custom["year_completed"][0]; ?>     <a href="<?=$website_url?>"><?php the_post_thumbnail(); ?>      <?php the_content(); ?>
         <?php endwhile; ?>
     <?php get_sidebar(); ?>     <?php get_footer(); ?>


title: wp-signup.php example template

text: I'm looking for an example wp-signup.php template for which to work with. I've done a search in Google but nothing from the past year comes up. :/ I've tried:   template-dir/registration/activity.php   template-dir/registration/registration.php   (these are BuddyPress I think)


title: page_template toggle between 2 templates + 2 permalinks for same post

text: I'm trying to use this page_template template from the WP forums, with the same aim as the original author: > I am trying to use two separate permalinks/templates for a single post - > each providing different views of the post (through different templates). > http://example.com/category/post-name -> uses template1.php > http://example.com/category/post-name/details -> uses template2.php I've modified the code according to the changes discussed in the thread, but my alternative template (for a custom post type) isn't being loaded — /post- name/detail just redirects to /post-name/. Any ideas?               // Add 'detail' to the permalink structure / query string      function detail_rewrite_rules( $rules ) {         $newrules = array();         $newrules['(.+?)/([^/]+)(/[0-9]+)?/detail/?$'] = 'index.php?category_name=$matches[1]&name=$matches[2]&page=$matches[3]&detail=1';               return $newrules + $rules;     }     add_filter( 'rewrite_rules_array','detail_rewrite_rules' );          function detail_flush_rules(){         $rules = get_option( 'rewrite_rules' );              if ( ! isset( $rules['(.+?)/([^/]+)(/[0-9]+)?/detail/?$'] )   ) {                  global $wp_rewrite;             $wp_rewrite->flush_rules();         }     }     add_action( 'init','detail_flush_rules' );          // Open up 'detail'     function detail_queryvars( $qvars ) {       $qvars[] = 'detail';       return $qvars;     }     add_filter('query_vars', 'detail_queryvars' );          // Switch between templates     function filter_single_template($template){              $object = get_queried_object();         $templates = array();              /* If detail is in the query string, create a list of templates to use */         // if($_GET['detail']) {         // if( get_query_var('detail') ) {         global $wp_query;         if ( $wp_query->query_vars['detail'] ) {                 echo "<script>console.log('Detail template activated');</script>";             $templates[] = "single-photos-detail.php";             // $templates[] = "detail-single.php";             // $templates[] = "detail-single-{$object->post_type}.php";         }              /* If one of our custom detail templates exists, return it.          * Otherwise return the original template          */         $templateSwitch = locate_template($templates);         return (!empty($templateSwitch)) ? locate_template($templates) : $template;     }     add_filter('page_template', 'filter_single_template');


title: Moving database with phpMyAdmin

text: I have a remote (website) version of a wordpress site and it's got more recent information than my local (computer) version. I would like to move the data over to my local using phpMyAdmin, what is the best way to go about this? Should I just export the entire database, import it and re-link my wordpress site to the "new" (more recent) database in the config file?


title: Outputting content from page

text: I'm trying to display a title, featured image, and content from a page into a new template (that will contain content from several pages). I tried to just echo the variables as shown below, but right now it's only display the content and title+"array". Any ideas? Here is my current array:                <?php      $id = 2131;      $post = get_page($id);      $content = apply_filters('the_content', $post->post_content);      $title = $post->post_title;      $image = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'single-post-          thumbnail' );      echo $content;      echo $title;      echo $image;     ?>


title: AJAX Call is Only Returning 100 Results from Query

text: I have this AJAX call to fill a dropdown:               function get_select_companies()     {         var t_id = $('select#select-product_types').val();         if( t_id == -1 )         {            $('#ajax-loader').hide();            $('#select-manufacturers').hide();         }         else         {         $('#ajax-loader').show();             $('#select-manufacturers').hide();             $('#select-manufacturers option').remove();              jQuery.ajax(             {                 url:     '/wp-admin/admin-ajax.php',                 type:    'POST',              data:    (                 {                  action:         'px_get_select_companies',                  type_id:        t_id                  }),                     dataType: 'JSON',             success: function(data)                     {                 $('#select-manufacturers').append(data);                 $('#ajax-loader').hide();                 $('#select-manufacturers').show();                    }             });         }     }      I then have this php function on my functions.php file               function px_get_select_companies()     {     $args = array(         'post_type'     => 'products',         'posts_per_page' => -1,         'tax_query' => array(             'relation' => 'AND',             array(                 'taxonomy' => 'product_types',                 'field' => 'id',                 'terms' => array( $_POST['type_id'] )             ),         )     );          $query = new WP_Query( $args );          while( $query->have_posts() ) : $query->the_post();         if( $query->post->ID != 1 ) :             $terms[] = get_the_terms( $query->post->ID, 'manufacturers' );         endif;     endwhile;          foreach( $terms as $term ) :         foreach( $term as $ID ) :             $term_IDs[] = $ID->term_id;         endforeach;     endforeach;          $term_IDs = array_unique( $term_IDs );          $output = '<option value="0" selected="selected">--- Επέλεξε Εταιρεία ---</option>';          foreach( $term_IDs as $ID ) :         $term = get_term_by( 'id', $ID, 'manufacturers' );         $output .= '<option value="' . $term->term_id . '">' . $term->name . '</option>';     endforeach;          wp_reset_postdata();          $output=json_encode($output);          if(is_array($output)){         print_r($output);        }     else     {         echo $output;     }     die;     }      The problem is that I get an endless spinner as it's not returning any results. If i change posts_per_page to 100 or less, it works as expected. Anyone have an idea as to why it's doing this? Thanks


title: TinyMCE strips line breaks on mceAddControl

text: I'm using `wp_editor` to add wysiwyg fields to admin edit screens. Each wysiwyg lives within a draggable meta box. Since TinyMCE has issues with dragging, I'm using the following code:               // on the dragstart event     tinyMCE.execCommand('mceRemoveControl', false, the_editor_id);          // on the dragstop event     tinyMCE.execCommand('mceAddControl', false, the_editor_id);      The problem is that, when `mceAddControl` is fired, all newlines and linebreaks are stripped from the text. Has anyone been able to solve this issue? **Before dragstart:** ![before dragstart](http://i.stack.imgur.com/OXLfx.png) **After dragstop:** ![after dragstop](http://i.stack.imgur.com/ngSV4.png)


title: Organizing shortcodes. How to display all of them and their attributes?

text: ## 1. My shortcodes I've developed multiple shortcodes for my own theme, I'm loading them in functions.php like this `require_once (MY_URL . '/bartag_shortcode.php')`. Here's an exemplary bartag shortcode from WordPress Codex:               function bartag_func( $atts ) {         extract( shortcode_atts( array(             'foo' => 'something',             'bar' => 'something else',         ), $atts ) );              return "foo = {$foo}";     }     add_shortcode( 'bartag', 'bartag_func' )      ## 2. How to list all of them?   * I'm not even sure if I can do that, since the add_shortcode() doesn't allow to group shortcodes, so I guess it will be pretty hard to distinguish my shortcodes from the others (from plugins, or other sources). Any ideas? I could loop trough all of shortcodes containing files using `foreach(glob('*.php') as $shortcode)` and `file_get_contents` with some regex, but when it comes to performance this is one of the dumbest ideas I've ever came up with.   * If that's not possible then how to display a list of all active shortcodes, so I could filter them somehow (I could add a prefix to the ones created by me and then list all shortcodes starting with this prefix). Thanks!


title: Grouping post-types in loop

text:
When a user selects a specific category from a drop-down a list of multiple post types is displayed. I'd like to display the data in groups with the post- type title above in a heading. I'm unsure how to segment into post-type groups. I spent a bit of time looking but didn't find exactly what I need. I also tried to add `<?php $post_type = get_post_type( $post->ID ); echo $post_type; ?>` but it's simply repeating (obviously). calling the loop
         <?php             $category_description = category_description();             if ( ! empty( $category_description ) )                 echo '
' . $category_description . '
';             get_template_part( 'loop', 'support' );         ?>
      The Loop               <?php else : ?>     <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?>
             type = <?php $post_type = get_post_type( $post->ID ); echo $post_type; ?> <?php echo get_post_meta($post->ID, "document-type", true); ?> <?php echo get_post_meta($post->ID, "software-type", true); ?>     <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>             <?php the_excerpt(); ?>             Compatible with:
             <?php if ( count( get_the_category() ) ) : ?>                     <?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>             <?php endif; ?>     <?php else : ?>     <?php endif; ?>
             <?php                 $tags_list = get_the_tag_list( '', ', ' );                 if ( $tags_list ):             ?>                                      <?php printf( __( 'Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>                              <?php endif; ?>


title: Capture post content before page renders

text: I'm trying to mesh Mustache Templating Engine with WordPress. So far, I have been very successful using the_content as a filter to parse my template tags e.g. `{{ something }}`. However, if let’s say, a developer hardcodes the template tags directly into the page template e.g. loop-page, the_content doesn’t capture the hardcoded tags. Is there a filter that will allow me to capture the content of the whole page template including the content?


title: get_the_post_thumbnail('thumbnail-name') always returns empty string

text: I need to duplicate a list of thumbnails elsewhere on a page and have set up a few different custom thumbnail sizes in my functions.php file. If I use:               the_post_thumbnail('photo-small');      Then the thumbnail gets displayed correctly, if I use:               echo get_post_thumbnail('photo-small');      Nothing gets echoed - it's an empty string. What I am trying to do is add the generated img tags to an array so that I can loop through it outside of the loop but for some reason it's always blank.


title: Looking for a answer regarding coding problem in wordpress.

text: Parse error: syntax error, unexpected ';' in /home/micram10/thebaysbesthomes.com/wp-content/themes/theme18020/footer.php on line 4 I am a va and don't have wordpress coding compatibility. However, I would like to know what;s this problem is about. When the site loads, this error message took place at the bottom. Is this some sort of plug in related problem?


title: Using categories on navigation bar instead of pages

text: Check this URL www.linuxstall.com. The top navigation bar has one page (about us). I want the categories there, not pages. How can I do that?


title: How to Compress PHP output in my plugin?

text: I never really dug into the compression options I have for my plugins and themes, so here I am. I was reading a few articles about PHP compression like this one and I had a question. Is it really as easy as adding the following code in the appropriate spot?               <?php     if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))         ob_start("ob_gzhandler");     else         ob_start();     ?>      I definitely want to learn more about compression as we all know the benefits of it, but I am unsure exactly where to start. Any suggestions? Are there better ways to effectively reduce the load time for my plugins and themes? It's not that I'm having a problem with a particular piece of code, I just would like to expand my knowledge on the subject. I am speaking in terms of a plugin or theme that would be used by many people, so this compression process would (hopefully) be sort of 'automatic', without having the user mess with their server configuration.


title: Hide Tag Title When No Tags

text: I'm using this Twig code to display tags on my posts. However, I can't figure out how to get the `Tags:` title to hide itself when there are no tags. If there's no tags, it just shows `Tags: ,` which of course looks ugly. The code I'm trying below doesn't work and gives me a bunch of errors. Any suggestions what I'm doing wrong?                  {% if post.tags_count > 0 %} Tags:         {% for tag in post.tags %}             {{ tag.name }}             {% if not loop.last %}, {% endif %}         {% endfor %}                 {% endif %}


title: Display all posts that were published before full post on single.php

text:
The way I would like my blog to work is a user clicks on a post that was published on 12th March 2012 (for example) they get taken to single.php where the content of that post is displayed as normal. Beneath this content I would like to display all posts published before it, not after. How can I edit my existing loop to do this? Here's my working loop that currently displays all posts, no matter what the date:
                     <?php                     $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;                     $args= array(                         'category_name' => 'offsite',                          'paged' => $paged,                         'posts_per_page' => 1                     );                     query_posts($args);                     if( have_posts() ) :?>                              <?php while ( have_posts() ) : the_post(); ?>
                         <?php the_post_thumbnail(); ?>
<a href="<?php the_permalink()?>"><?php the_title(); ?> / <?php the_time('l jS F') ?>
                              <?php the_content(''); ?>
                             Comment

                                                  Facebook

                                                  Tweet                                                  Twitter

                                          + Share

                              <?php global $withcomments;                         $withcomments = 1;                         comments_template(); ?>
                               <?php endwhile; ?>
<?php next_posts_link( 'Older posts /', $post->max_num_pages ); ?> <?php previous_posts_link( 'Newer posts', $post->max_num_pages ); ?>
                          <?php endif; ?>                     <?php wp_reset_query(); ?>


title: How to paginate the get_users function?

text: Im using the get_users function to show a custom list of users on the site. The only issue Im having a problem figuring out now is how to paginate the result. This is a sample of the function that Im using: ![Sample Code Screen shot](http://i.stack.imgur.com/mObPT.jpg) There doesn't seem to be an obvious way of creating a pagination for the this function. I would appreciate some help with this.


title: Outputting post title without encoding

text: I'm setting up a way to feed the title of a WP post as the title argument for a reddit button. It works fine unless there is an encoded character in the string:               apostrophe’s break things.      ...Which results in reddit double encoding the ampersand:               apostrophe&#8217;s break things.      I've tried the functions the_title_attribute(), the_title(), html_entity_decode(), and htmlspecialchars_decode() all to no avail - certain encodings remain. Anyone know a way around this? Like a way to get the raw unencoded title from the database? Thanks!


title: Locally change the font family

text: I'm using the standard Wordpress theme ( _WordPress Default 1.6_ by Michael Heilemann). The standard font for my articles is a sans-serif font. I'd like to display, for a sentence only, a serif font ( _Times_ for instance). I didn't find a way to do this. Is it possible ?


title: Modify pages widget and make a plugin?

text: I would like to make a plug-in that adds a widget. I would like it to be based on the current pages widget but add the ability to select either include OR exclude by drop down or checkbox then list pages by ID. Following this guide I was able to change the exclude to include by hacking the core file located in wp-includes/default_widgets.php. Here is the original code: http://pastebin.com/Rg2vTMmK How do I make the changes and turn it into a plugin? Many Thanks


title: Redirecting URL with Twitter Button API Not Working

text:
I'm trying to make a Custom Twitter Button in my content.php so where it's placed at the bottom of each post and a button appears that when clicked it can send a Tweet this to Twitter with the post id's url. However, I can't figure out this "bug" that I'm running into and I thought possibly one of you Stackoverflow Wordpress users would know. So below is some code from my content.php and when I have just the a href link added the button works and can fetch the url. So when clicked on example it will go to twitter and have the url as myblog.com/mattspost-111. Do note that only the text shows and not the twitter bubble with how many tweets have been tweeted.                 <a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>"  class="twitter-share-button" data-via="MattStenquist" data-lang="en" data-size="large" data-related="MattStenquist">Tweet
      However, when I add the full code including Twitters < script >< /script > statement when the button is clicked all it does is pull up the url of the blog for example. myblog.com/blog not the post associated with it.                         <a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>"  class="twitter-share-button" data-via="MattStenquist" data-lang="en" data-size="large" data-related="MattStenquist">Tweet
      In short, all I want is so I can have a universal twitter button on the categories page that fetches the posts url, when in category mode and when in just viewing the post.


title: add custom fields to the post on admin side

text: I need to add a custom field in admin section (below the title field) which insert the values of that custom field in the db table. but all this i want to do through coding like               <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />      This is for the text box title I need the same one for age, one for country, and one for date of birth below the title field without using any plugin I'm really very confused thanx for help


title: Wordpress clone from live to local

text: I am trying to clone a live wordpress instalation to my local machine. I have copied all of the files throught FTP and Mysql database too. Everything is set up correctly and site_url and blog fields in wp_options table have been changed to the new local location: `http://localhost/fooolish/androsrace/` When i am going to visits this location it redirects me to the live. I have spent many hours reading tutorials but I can't find any solution.


title: Resizing images failing

text: I have recently added theme support for post_thumbnails with three new sizes, I wanted to resize all the old images uploaded previously. I have written my own script as follows:               function resizeImages()     {              require ( ABSPATH . 'wp-admin/includes/image.php' );              global $wpdb;         $images = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_mime_type LIKE 'image/%' ORDER BY ID DESC");              foreach ($images as $image)         {             $fullsizepath = get_attached_file( $image->ID );                  $metadata = wp_generate_attachment_metadata( $image->ID, $fullsizepath );             // If this fails, then it just means that nothing was changed (old value == new value)             if (wp_update_attachment_metadata( $image->ID, $metadata ))                     {                         echo $fullsizepath . " resized" . "<br/>";                     }         }          }      The images that have been uploaded through wordpress work fine, but I have added some of my images by php. The images in question were picked up from our old site with a crawler and added to the database as children of the correct ID. I can retrieve all the images using get_children on the index.php page and on single.php, but for some reason they are not being resized. Can anyone help here?


title: WordPress Cumulus

text: How to install WP-cumulus add-on into WordPress ? Thanks,


title: Custom post type with custom taxonomy

text: My WP site has 2 custom post types, "Projects" and "People". There can be unlimited number of "People" per project and I'm thinking about a way to integrate the projects section with "People" section. My first impression was using custom taxonomies. But the problem is, is there a way to set a relationship between these 2? If custom taxonomy is the only way, is there a way to make it so when adding new people custom taxonomy get created as well?


title: Post Format Archive template name for theme folder?

text: What should I call the archive file for a post format? Ex archive-gallery.php? (doesn't work) I would like to create a list of all the gallery formats with a preview and some custom taxonomies thrown in.


title: WordPress eCommerce plugin for books

text: I am looking for a WordPress plugin or helping resource which I can use to build up a eCommerce website for books which has "View Inside" feature, payments to be handled with paypal. Heard of anything like that or used something similar? Any ideas how do I go about building an eCommerce site of such scope? Also any theme which will be a good fit? P.S. - I am new to building a eCommerce website with WordPress & a bit confused on which are good platforms to build it. What do you guys use and recommend?


title: Need help with simple rewrite rule (shouldn't this be easy?)

text: All I need is a rewrite that will change `example.com/anyphrase` into `example.com`. Here is what I am using:               RewriteCond %{HTTP_HOST} ^example\.com     RewriteCond %{SCRIPT_FILENAME} !wp-admin     RewriteCond %{SCRIPT_FILENAME} !activity     RewriteCond %{SCRIPT_FILENAME} !members     RewriteCond %{SCRIPT_FILENAME} !groups     RewriteRule ^([A-Za-z0-9-]+)/?$ index.php [L]      Notes:   I added the above to the top of my `.htaccess` file (in WP root). I am running WordPress 3.1.3 multisite (subdomains), WP MU Domain Mapping plugin, and buddypress on `example.com`. The mapped domain name is `example.com`, not the actual subdomain. I was assuming that my rewrite rule would load `example.com/index.php`, which would load the homepage for the WordPress site. However, I get a "page not found" response shown in my buddypress skin (not a full-blown error 404 page).


title: Pagination : How to remove /page/x/ after a 'POST' action on a form returning to page 1

text: I have the following query, what it does is get a list of "Books" (custom post type). This list is displayed on a page which also has a small form with a dropdown populated with the terms of "Editors" (custom taxonomy). When a user chooses an "Editor", it reloads the page and the query returns the corresponding "Books".               // Taxonomy query     $tax_query = array('relation' => 'AND');     if($_POST['editor']) array_push($tax_query,array('taxonomy' => 't_editor','terms' => array($_POST['editor']),'field' => 'slug'));          // Pagination     if($_POST['reset_pagination'] || !get_query_var('paged')){         $paged = 1;     }else if (get_query_var('paged')) {         $paged = get_query_var('paged');     }          // Query     $myquery = array(         'post_status' => 'publish',         'post_type' => 'books',         'orderby' => 'title',         'order' => 'ASC',         'tax_query' => $tax_query,         'paged' => $paged     );      As there are many many "Books", I use pagination. Now, the problem. Lets say I'm on the general list (non-filtered by "Editor"), I have 200 results, with a pagination of ten per page. Let's say I browse until page 8. Then, if I decide to filter my choice by "Editor", the page reloads and displays only those results. The problem is that as I was on page 8, my URL has /page/8/ attached to it. I found how to reset "paged" to 1 after a filtering has been made (with a hidden "reset_pagination" field on the form), it works and I have the results of page 1 after a filtering, BUT in the URL the pagination (/page/8/) remains. How can I remove "/page/x/" from the URL ? Edit : Here's the code for the form               <form action="" method="post" id="filter">     <ol>         <li>             <?php include(TEMPLATEPATH . '/includes/forms/filter_editors.php'); ?>         </li>         <li>             <input type="hidden" name="reset_pagination" value="1"/>             <input type="submit" class="submit" value="<?php _e('Ok'); ?>" />         </li>     </ol>


title: Insert First Image into post (full-width)

text: I am looking for a simple PHP function to insert the first image from the gallery into the post, full width (I am using custom post types btw). So the syntax will be:               <img src="xxxxx" />      any ideas? many thanks Andy


title: content of the page is not displaying getting empty page

text:
1stWebDesigner PHP Template

          <?php wp_list_pages('title_li=');?>

               <?php if(have_posts()) :while (have_posts()) : the_posts();?>
<?php the_title(); ?>
     <?php the_content(); ?>     <?php endwhile; endif;?>

     Navigation          Home     About Us     Links     Portfolio     Contact     Box Two          Link Here     Link Here     Link Here     Link Here     Link Here     Box Three          Link Here     Link Here     Link Here     Link Here     Link Here
      Copyright &copy 2010 1stWebDesigner.com PHP Template
                 i used this code to display the content but am getting blank page


title: Handle registrations in WordPress when user doesn't have any email?

text: Here's my problem. I have a WordPress installation that has about 30 users with duplicates of emails in the users table. That's ok, because that's how I had to do it for the time being. I wanted users to register with exactly the same email because parents had to register their children into the system and their children did not have any email addresses (could be children from age 4 and up). An example of the database could look like               x@gmail.com (parent)     x@gmail.com (where this is child1 to parent)     x@gmail.com (where this is child2 to parent)      I solved this temporarily (because I had to get this fixed quickly), but now I would like the users be able to login and change some stuff in their profile. Usernames and passwords are created and are totally unique so it's possible to login - but no one has received usernames or passwords because the initial thought was not to give them ability to login. I could solve the issue by sending usernames and passwords to the user (parent and the parent's children) to`x@gmail.com` and go through all the 30 users (parents) and do the same. But **my issue lays in how to handle future registrations**. Each user must be unique cause each user has some custom fields related to itself. Any ideas? **UPDATE** It's about registrering different dance-courses. The dance academy wants to keep track of how many pupils (users) there are at any course and wants to keep to track of user has payed the course or not. Sometime the user can be set as reserve and sometimes not. To complicate it further it's not always this relationship between parent/child. Sometimes- let's say an 18-year old wants to register at 3 dance-courses and the user is "child" (or could at least handle the registration him/herself)