Trying to override/intercept a PhotoMosaic gallery link in Wordpress using jQuery

The page in question is located at http://www.sandbarmedia.com/clients/va/gallery/. Basically, I'm trying to use jQuery to intercept a click on one of the photos in the mosaic so that it jumps to the corresponding picture in the gallery below. The bottom gallery will be hidden once all of this works, and the end effect should be that clicking on a mosaic photo jumps the user into the appropriate place in the lightbox photostream. I currently have some code that works with a text link (the "test" link below the mosaic), but when I try to apply the code to one of the mosaic photos, it doesn't work. I've inserted this little bit below the rest of the content in the page:               <script type="text/javascript">     $("a[href$='1GBanquette2.jpg']").click(function() {         $("a[title='2GDiningRoomPlaceSetting']").trigger('click');         return false;     });     </script>      The intent was to capture clicks on links that contain the filename of the first image in the mosaic and to activate a click on an image in the gallery. I assume that the shortcode is loading after the jQuery somehow, but I'm not sure if that's the problem, and if it is how I'd fix it. I'd really like to be able to keep this code inside of the Wordpress page editor so that it would be user-updateable without having to dig around in a file structure, but I understand if that's not possible. Thanks in advance!


Variable Product Price - Change Display Location

I've built a custom theme for a Woocommerce shop and changed the custom product price front its default location to another. This works well with single products, or variable products with the same price between variations. However, when viewing a variable price product, I get two price tags displayed, istead of just updating the existing one. Example ![enter image description here](http://i.stack.imgur.com/1uHc3.png) I've tried a jquery approach to update the upper field and hide the other, but it just doens't feel to be the right approach. Can anyone point me in the right direction?


header specific meta box result detect url

I've got 3 header.php files and 1 detects whether their either on page 1 or page 2. I have a custom meta box thats outputting the results onto each header - that all works fine. However when I go a page deeper the meta box information isn't showing, I've tried various if statements but nothing shows up. Any help would be great. my header output looks like:               <?php     global $post;     $header_meta = get_post_meta($post->ID, 'page-header-meta', true);     if( isset( $header_meta ) ) {     echo '
' . $header_meta . '
';     }     else {         echo '
Knowledgebase
';     }          ?>


save_post hook not triggered in WP v3.6.1

I developed a plugin having a custom metabox that is using the `save_post` hook to store data. The plugin is 18 months old and is used by thousands of customers, so I'm pretty sure everything is good. Since I updated my testing platform to v3.6.1, I can't get that hook to run on previously created pages/posts. It only works on new ones. (I am the only WP user in the website. WP DEBUG is enabled) Has anyone experienced the same? Any clue? I missed some changes? **EDIT:** The code I'm using now to check the hook is this (I've deleted the inner code for privacy reasons):               function saving_metabox($post_id) {         die('test');              if(isset($_POST['plugin_noncename'])) {                    ... ...         }              return $post_id;     }     add_action('save_post', 'saving_metabox');


Is there a way to get the site_url in HTML code?

I have a WordPress website and it sends some transactional emails to the users. I create the template using HTML and I've been wondering if there's a way to add the `<?php echo site_url() ?>` in there so I don't have to change it manually every time I create a new website. I have already tried using the `<?php echo site_url() ?>` in there, but it won't work. Here's a sample of the code I am using               Deals	      Is there any way to achieve this? Thank you in advance for the help, Kat


Setting a taxonomy consisting of sites' name

Hi I am running a multisite and I would like to set the taxonomy as sites' name. so the category will have options of Group A, Group B etc. The problem I have now is that I do not know how to get a name for the site! Can anyone please tell me the way to achieve this?


Exclude a category from the filed under list

I have a site where I have a category that I'm using for some backend functionality. However, when I'm viewing a post that is in that category and other categories, I don't want to see that category in the list of categories that the post is "filed under" or "posted in" or whatever it's called. **To make it clearer** \- I have a category X that I'm using to do stuff for the theme. The post is categorized in A, B and X. On the post page, it says "Filed Under: A, B, X". I would like it to say "Filed Under: A, B" I was looking for a way to exclude that category id from the `get_terms` call, but I'm not sure how to go about it. Is that even the right way? I originally thought this was a `post_meta` issue, but it seems it's `get_terms` related. Can I add a filter on `get_terms` to always exclude a category? If it matters, I'm using the genesis framework, and this call happens in the `do_action('genesis_after_post_content')` call. But again, if I can add this as a global filter in my functions.php that'd be the best solution. I have tried the method mentioned in this post, but it did not work.


Exclude page by title for non admins

I have this snippet built from a couple of sources, it works great and if the user is not an admin it hides the page with an id of 243 from being seen in the edit pages section....               add_action( 'pre_get_posts' ,'exclude_pages' );     function exclude_pages( $query ) {         if( !is_admin() )             return $query;              global $pagenow;         if( 'edit.php' == $pagenow && ( get_query_var('post_type') && 'page' ==     get_query_var('post_type') ) )             $query->set( 'post__not_in', array(243) );         return $query;     }      I would really like to modify this so that it can work with page title instead of id, can anyone point me in the right direction?


wp_enqueue_scripts hangs

In the following snippet, when I add the `wp_enqueue_scripts call`, the page freezes. What am I doing wrong?               function my_enqueue_stuff() {       if ( is_front_page() ) {         wp_enqueue_style('style', get_template_directory_uri() . '/css/homepage.css', array(), null, 'all');       } else if ( is_page( 'corsi' ) ) {         wp_enqueue_style('style', get_template_directory_uri() . '/css/corsi.css', array(), null, 'all');       } else if ( is_page( 'dove-siamo' ) ) {         wp_enqueue_style('style', get_template_directory_uri() . '/css/dove-siamo.css', array(), null, 'all');         wp_enqueue_scripts('js', get_template_directory_uri() . '/lib/map/gmap.js')       } else if ( is_page( 'contatti' ) ) {         wp_enqueue_style('style', get_template_directory_uri() . '/css/contatti.css', array(), null, 'all');       } else if ( is_page( 'insegnanti' ) ) {         wp_enqueue_style('style', get_template_directory_uri() . '/css/insegnanti.css', array(), null, 'all');       } else if ( strpos($_SERVER['REQUEST_URI'], 'galleria') ) {         wp_enqueue_style('style', get_template_directory_uri() . '/css/galleria.css', array(), null, 'all');       } else {         /** do nothing */       }     }     add_action( 'wp_enqueue_scripts', 'my_enqueue_stuff' );


Troubleshoot "You do not have sufficient permissions to access this page."

I recently changed the database table prefix from wp_ to something else, for security reasons. Since then, I am unable to reach /wp-admin, instead receiving > You do not have sufficient permissions to access this page. I read this question, and I renamed `wp_user_roles` to `myprefix_user_roles`. This did not resolve the problem, even after clearing my browser cache and cookies. How do I resolve this?


Diagnosing a connection reset problem

A couple of weeks ago I purchased a theme from ThemeFuse and installed it in a new WordPress installation. From there, I've been having random errors when accessing or browsing the site. Some requests take too long and other just gives me "connection reset" error. I've been trying to get support from ThemeFuse and GoDaddy (since I don't really know where the problem lies), and both of them have answered me with not being able to replicate the error and to document it. Here's the url of the site: http://www.martinycarolina.com/wordpress/ How can I diagnose this error to know where is it coming from, and how can I fix it? My setup is as follow:   GoDaddy windows hosting plan   WordPress 3.5.1.   ThemeFuse Just Married Theme http://themefuse.com/wp-themes-shop/wedding- wordpress-theme/


Display all page numbers at the same time

WordPress only shows a few page numbers at a time and I have to keep clicking on the "right" arrow to advance one page at a time. I have 31 product pages, each with many products so it takes "forever" to advance through the pages to finally get where I need to do some editing work. Is there any way to show all of the page numbers at the same time so I can just click on the page I need?


Set Custom Date for Posts

I have a blog im working on in draft form. These blog posts are relevant to various days in the past few weeks but I would like to keep them hidden for the moment. When I publish one it gets todays date, is there a way to choose what date it has?


Is it possible to make Wordpress as a RESTful app?

I'm planning to create a Wordpress plugin that accepts data via cURL and sends a JSON reply. The plugin will save the data in the database upon receive so there has to be some authentication and will send JSON data back as a confirmation if data is successfully saved. Is it possible?


Woocommerce category description as subtitle

I'd love to place the category description just after the main title in a span, like a subtitle.               add_filter ('woocommerce_page_title', function ($title) {         // what should be here?              $title .= "{$description}";         return $title;     });      Thanks.


Adding data to options table

I am currently tweaking a plugin so that all "contributors" (here referred to as "players") are automatically subscribed to a forum. I basically want to subscribe everyone with the role of contributor and above (I've used user_level because the rest of the plugin does and I thought I should be consistent.)               function forum_subscribe_member_player()     {         $players= get_users();              foreach($players as $player){                  $playeremail = get_userdata($player->ID, 'user_email');             if(!empty($playeremail) && $player->user_level >= 1)             {                                    $list = get_option("mf_forum_subscribers_1", array());                           if( is_player_subscribed($player->ID)) //remove user if already exists (user clicked unsubscribe)                 {                     $key = array_search($playeremail, $list);                     unset($list[$key]);                 }                 else                     $list[] = $playeremail;                 update_option("mf_forum_subscribers_1", $list);             }         }            }      Its not working and I'm guessing there is a problem with `$player->is_player_subscribed()` which is here :                function is_player_subscribed($user_ID)     {           if($user_ID)           {             $useremail = get_userdata($user_ID, 'user_email');             $list = get_option("mf_forum_subscribers_1", array());             if(in_array($useremail, $list)){               return true;             }             return false;           }     }      Which uses the `global $user_ID` rather than `get_users()` I would love some help with this or even to be pointed in the right direction. EDIT: based on comment by @murdaugh


How to make a copy of a local wordpress build in MAMP?

I've been working on my site locally using MAMP and installing the wordpress folder in htdocs. However i wanted to make a copy of the site so that i can test another solution. I can't do a git init in my htdocs folder so i copied my build from my htdocs folder to my desktop and initiated git and all works well. However when i access the copy of my wordpress build (which is in another directory) and i start to click around the links don't respond to the new build but rather the original which is in my htdocs folder. This gives me the impression that:   * a) only the homepage is recognizing the new copy but my internal links, even though they are nothing more than /category/place..etc is generic,don't specify the domain.   * b) If i make changes to the new copy it will in fact be changing my original.   * c) on my next project i should start with a git repo and NOT work within the htdocs folder


Create Multiple File Upload Metabox in Wordpress

I am trying to create a metabox to upload multiple files (can be images or files). Currently I have the upload field and its working file till the time we press upload and saving the data. The only problem is displaying the files. Below is my code, I am using to display the metabox:               case 'file_list':                         echo '<input class="cmb_upload_file" type="text" size="36" name="', $field['id'], '" value="" />';                         echo '<input class="cmb_upload_button button" type="button" value="Upload File" />';                         echo '
', $field['desc'], '
';                             $args = array(                                     'post_type' => 'attachment',                                     'numberposts' => null,                                     'post_status' => null,                                     'post_parent' => $post->ID                                 );                                 $attachments = get_posts($args);                                 if ($attachments) {                                     echo '
';                                     foreach ($attachments as $attachment) {                                         echo '
'.wp_get_attachment_link($attachment->ID, 'thumbnail', 0, 0, 'Download');                                         echo '';                                         echo apply_filters('the_title', ' '.$attachment->post_title);                                         echo '
';                                     }                                     echo '
';                                 }                             break;      1) Currently its displaying me all the files attached to post & I need to display only the files uploaded using this metabox. 2) Need a small thumbnail preview of the file. Regards.


Load code for custom fields only on admin pages?

Is this possible? I have big chunk of code for creating and saving custom meta fields, and I have a feeling that this has some impact on wordpress loading time ( **?** ). I tried with               add_action('init', 'admin_only');          function admin_only() {         if ( is_admin() ){             require_once('functions_admin.php');         }     }      but on **"add new post"** screen custom fields are missing.


How to create an Underconstruction message and Setting for a Wordpress website without using plugin

I am building up a website for C Programming Tutorial www.programminginc.net . Now I am using a plugin to show my site under construction. What is the code used to create a website under construction setup?


enqueue script if page is not equal to

I'm registering some js scripts in my function.php, I have 2 versions of one js file, one FOR the homepage, and one for every other page.   I've managed to get this to work to register the homepage script successfully:               function home_script_method() {         wp_register_script( 'homescript', '/wp-content/themes/template/js/menu-home-open.js' );         if( !is_page( 'home' ) ) // If it's not the given page, stop here         return;              wp_enqueue_script( 'homescript' );     }          add_action( 'wp_enqueue_scripts', 'home_script_method' );      But is it at all possible to register an alternative script for every other page, i.e. if on the homepage then register `menu-home-open.js`, if on any other page then register `menu-open.js`. Is that at all possible? Can't seem to get it to work, any suggestions would be greatly appreciated!


failed to load wp-admin/admin-ajax.php

I'm getting this strange issue. Everything was working fine last day. Now suddenly none of my ajax requests work. The problem is (i found that in firebug console): > failed to load resource : ....../wp-admin/admin-ajax.php So somehow the request to the `admin-ajax.php` file isn't successful. I have cross checked these things:   1. the url to `admin-ajax.php` is correct and no issues there   2. its not just 'my own scripts' which doesn't work, i've buddypress installed and all ajax requests from buddypress also give the same error   3. i directly typed in the url of `admin-ajax.php` into browser and instead of getting 0 (the expected output), google chrome says 'no data received'. Is it some configuration on server end?? If yes then what do i say to the hosting support guys? BTW, if it matters, the site is hosted on wpengine.. Any help is really appreciated **UPDATE :** the browser dev tools screenshot : ![enter image description here](http://i.stack.imgur.com/SQgEV.png)


Post Loop Category first show parent then child

Iam using this wp function to show category in my post I have certain post where i put the same post in two categories It is showing alphabetically, I want to show first parent then child category. EDIT:               <?php the_category(', ') ?>


How to update theme from localhost to online site

I am currently working on a project, actually we have an online site, we are thinking of revamping this. On this online site we have many blogs already. We have purchased a theme also and doing many customization on `localhost`. How is this possible to update the theme with customization and pages on `online server` from `localhost` without affecting the blog posts?


How to reduce Header at the top of the page

Using a new theme and wondered how I go about reducing the black space above the header as currently it is too deep. The site in question is here http://www.marqueehireauckland.net.nz/ The theme is twenty eleven Cheers


Printing out Category and all Category Children on category.php

A new site i'm making is going to use extensive use of the categories, so here's what i'm trying to accomplish: Main Category Name (Link) List of Sub Categories (All Links) When i'm on a sub-category page I want it to look like the Main Category page just with the sub-categories highlited. Is that possible?


Valid HTML in Template Part

in a custom plugin I have a WPQuery, which looks like the following:               $sticky = get_option( 'sticky_posts' );         $args = array(             'post_type' => 'mission',             'ignore_sticky_posts' => 1,             'orderby' => 'date',             'post__not_in' => $sticky,             'posts_per_page' => $count         );              $latest_missions = new WP_Query( $args );         if ( $latest_missions->have_posts() ) {             while ( $latest_missions->have_posts() ) {                 $latest_missions->the_post();                 get_template_part( 'content-list', get_post_format() );             }                  wp_reset_postdata();         }      and the corresponding template part:               <li  id="post-<?php the_ID(); ?> " class="future-event"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?>
      The only problem I have is, that this will no produce semantic correct HTML, because the list is not sematically correct. Is there a way, how I can create an `<ul></ul>` which is wrapped around the list, when my loop is finished? BR, mybecks


Show HTML form before WordPress plugin deletion

I want to show interface to admin on plugin deletion, having choices (radio buttons) with a question - "Please let us know why are you deleting the plugin?" I know about `register_uninstall_hook` but I cannot use HTML code in it.


Custom Log In Screen - Disable password recovery

> **Possible Duplicate:**   >  Change login error messages I'm creating a custom log in page on a wordpress install and would like to remove the "Lost your password?" link from the "ERROR: Invalid username. Lost your password?" message that comes up if the user inserts the wrong password. I've been looking in the wp-login.php but must be missing something, can someone point me to the right file?


Search Everything plugin integration

The search on my wordpress site is resulting in a 404. When I hit the search button it tries to open a php file in a path that does not exist wordpress/wordpress/index.php. I dont know how that was configured or where to reset the search button action code. I assumed that installing "search everything plugin" will solve my search problems, it did. The test does a wonderful search. But I need to figure out how to fix the search button issue. I have just started work on wordpress and dont know php. Edit : I just did a "view source" for my home page and found               <form id="searchform" class="searchform" method="get" action="http://localhost/wordpress/wordpress/index.php">      I also did a               sudo grep -r "searchForm" .      To find the source of all my pain,               ./wp-content/themes/graphene/searchform.php:<form id="searchform" class="searchform" method="get" action="<?php echo get_home_url(), $_SERVER['PHP_SELF']; ?>">      Seems like the url is getting its value from PHP-SELF So I search where PHP-SELF is getting its value from               sudo grep --exclude-dir=.svn -r "SERVER\['PHP_SELF'\] = " .     ./wp-includes/load.php:     $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] );     ./wp-login.php:     $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );      Now, seems like REQUEST_URI is used to initialize PHP_SELF OR Its PATH_INFO and PHP_SELF As I dig further it gets more complex. My question is, **What is expected to be the value of PHP_SELF.**               sudo grep --exclude-dir=.svn -r "SERVER\['REQUEST_URI'\] = " .     ./wp-includes/load.php:         $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];     ./wp-includes/load.php:         $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];     ./wp-includes/load.php:                 $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];     ./wp-includes/load.php:                 $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];     ./wp-admin/link-manager.php:    $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);     ./wp-admin/upload.php:  $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);     ./wp-admin/upload.php:  $_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']);     ./wp-admin/upload.php:  $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);     ./wp-admin/upload.php:  $_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']);     ./wp-admin/upload.php:  $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']);     ./wp-admin/upload.php:  $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);     ./wp-admin/plugins.php:$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']);     ./wp-admin/edit-tags.php:<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);     ./wp-admin/network/themes.php:$_SERVER['REQUEST_URI'] = remove_query_arg( $temp_args, $_SERVER['REQUEST_URI'] );     ./wp-admin/network/site-users.php:$_SERVER['REQUEST_URI'] = remove_query_arg( 'update', $_SERVER['REQUEST_URI'] );     ./wp-admin/network/site-themes.php:$_SERVER['REQUEST_URI'] = remove_query_arg( $temp_args, $_SERVER['REQUEST_URI'] );     ./wp-admin/includes/class-wp-plugins-list-table.php:            $_SERVER['REQUEST_URI'] = add_query_arg('s', stripslashes($_REQUEST['s']) );     ./wp-admin/edit.php:$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] );     ./wp-content/plugins/w3-total-cache/lib/W3/PgCacheFlush.php:        $_SERVER['REQUEST_URI'] = $url;     ./wp-content/plugins/w3-total-cache/lib/W3/PgCacheFlush.php:        $_SERVER['REQUEST_URI'] = $request_uri;


Hide Product detail page from non login user woocommerse

I have a situation in which all product are listed on a page. What I need is when someone click on product and if user is not login it should redirect on login page and if user is login it should take to product detail page.


Creating a function that sanitizes the custom metabox excerpt

I'm still getting to grips with functions and experimenting with different php functions. I've created a function what I want to use in sync with my custom metabox excerpt. It will basically sanitize the data and make sure its 150 characters long and the first word starts with a capital letter. My code is very loose at the minute as I'm testing the functionality out, But am kind of lost as to how I should go about this, Sorry for any simple mistakes. the $test_excerpt was just to test it, but at the moment it outputs nothing. Code is below.               <?php          //Function that trims any access spaces either side of the excerpt incase it fails the validation run          $text_excerpt = "test";          function vs_trim_excerpt($text_excerpt) {         if(isset($text_excerpt)) {         trim($text_excerpt);         ucfirst($text_excerpt);         wordwrap($text_excerpt, 150);         return $test_excerpt();         }      }          vs_trim_excerpt();     ?>          add_action('init', 'vs_trim_excerpt');


Divide the list into two columns (get_posts)

The function below lists posts based on custom field. The result is involved in a list `<li></li>`. What I would like to do is count how many list items there are, then divide it into two ul's. Is there any way to split the result into two columns? ![](http://i.stack.imgur.com/NGTaE.png)               function article_series() {     global $post;     $series = get_post_meta($post->ID, 'Series', true);     if($series) :         $args = array(             'numberposts' => -1,             'meta_key' => 'Series',             'meta_value' => $series,         );         $series_posts = get_posts($args);         if($series_posts) :             $class = preg_replace("/[^a-z0-9\\040\\.\\-\\_\\\\]/i", "", $series);             $class = strtolower(str_replace(array(' ', ' '), '-', $class));             echo '

' . __('Articles in this series') . '

';             foreach($series_posts as $serial) :                 if($serial->ID == $post->ID)                     echo '
' . $serial->post_title . '
';                 else                     echo '
ID) . '" title="' . str_replace('"', '"', $serial->post_title) . '">' . str_replace('"', '"', $serial->post_title) . '
';             endforeach;             echo '

';         endif;     endif;      Function created by justintadlock.com Thanks for any help.


Customizing a walker menu class

Hey Folks I trying to customize a walker class to add custom classes to navigation level. Essentially there will be 3 levels of navigation.               <ul  *custom class*>       <li  *custom class*>        <ul *custom class*>         <li> </li>        <li> </li>       <ul>      </li>      <li> </li>     <ul>       When a level 1 (or 2,3) LI has a ul following it, how do I add a custom class to that li and the following ul? and essentially this pattern would repeat for every other level. Thanks!


wp_enqueue_script does not work

I am developing a child theme based on the roots theme. I created a **front- page.php** and added the following. I test that the page is loaded because I see the I am loaded text. However, the scripts are not loaded. What is wrong with my setup?               <?php     function dd_register_scripts() {         wp_register_script(             'something',             get_template_directory_uri() . '/assets/js/something.min.js', array('jquery'), null, false         );     }               function dd_enqueue_scripts() {          wp_enqueue_script('something');      }          add_action('init', 'dd_register_scripts');     add_action('wp_enqueue_scripts', 'dd_enqueue_scripts');     ?>
I am loaded


Adding search form to header in huemen theme along with header background image

I want to add a search form to heumen header along with the header image. there is one more problem that i want to redirect the user to another website when he searches that form. example he searches for shoes in the form and then this search query should be posted to another url and the user should be redirected to the search result page of the other website. Thank you


Randomize Posts. Skip the first post in ascending order

I'd like to randomize a set of posts (custom post type), but ignore the first post all together. Here's the code I thought would work:               $featured_content_query = new WP_Query( array(       'post_type'       => 'feature',       'offset'          => 1,       'posts_per_page'  => 10,       'order'           => 'ASC',       'orderby'         => 'rand'     ) );      Without the `orderby` the post I want skipped over is ignored, but as soon as I add the random order it adds it back into the mix. Does anyone know what I'm doing wrong? I feel like I'm missing something really obvious here. Thnx!


How can I configure WP multisite to use /blog/ as part of the path structures?

I'm migrating an existing group of sites to multisite using subdirectories and need to match the url paths exactly, and am running into conflicts with the /blog/ path that gets inserted by default on the root install, among other things. I've combed all of the multiple posts on this, but haven't found an answer to my specific problem, so here goes. I'm trying to achieve the following:   * example.com/blog (english language blog)   * example.com/fr/blog (french)   * example.com/ja/blog (japanese) etc. Multisite restricts you from using /blog/ as it is inserted into the root install paths by default, and same goes for using it in a subpath, ie. /fr/blog. Any ideas? I'm completely stumped. Thanks


wp_get_attachment_image_src

When I use `wp_get_attachment_image_src()`, the medium sized image is returned on 3 out of 6 of my images. The other 3, the full size image is returned. I've checked and the medium sized image exists for all of the images, even the ones where the full size image is only being returned. The only thing I can think of is that the images that will only return as full size, were very large when uploaded. Here's my code:               $photos = get_post_custom( $photo_id );     for ( $i = 0; $i <= 12; $i++ ) {         if ( isset( $photos[ 'photo'.$i ][0] ) ) {             $image_attributes = $alt = '';             $image_attributes = wp_get_attachment_image_src( $photos['photo'.$i][0],  'medium' );             $photo .= '';         }     }


How Does One Create a Global Variable Repository

This may have a simple answer but I would like to store all the variables I've declared ( or cached ) across my theme in a central file and serve then this file globally ( Similar to how `get_header()`, `get_footer()` and `get_sidebar()` works ). I've tried creating a file called `variables.php` and serving it via `get_template_part` but without success. For this particular project, it would be more convenient if the multitude of variables I've created across my theme were housed in a central location in lieu of being scattered throughout various theme files. Is there a idiomatic way of accomplishing this in WordPress?


Displaying query with results using a custom post AND custom tax search

I'm trying to display the search query and taxonomy in the header of my results page. Normally this would be easy with I'm using the plugin Advanced Custom Post Search to conduct the search. It would normally be easy with the_search_query(); right? But that returns blank when conducting searches via this plugin. I was hoping that there is some clever way of pulling the values I need out of the query. Can anyone help me with this? Thanks


WP_Tax_Query with post_tag not working

Using the pre_get_posts hook, I'm trying to allow users to narrow down their search by limiting it to posts with certain (multiple) tags applied. This is my hook and function:               add_filter('pre_get_posts', array($this, 'pre_get_posts'), 0);          function pre_get_posts( $query ) {     if ( !is_admin() && $query->is_search ) {         $query->set( 'post_type', array( 'post', 'resource', 'initiative') );         if (isset($_GET['tags'])) {             $tax_query = array(                 array(                 'taxonomy' => 'post_tag',                 'field' => 'slug',                 'terms' => $_GET['tags'],                 'operator' => 'AND',                 )             );             $tax_query = new WP_Tax_Query($tax_query);             $query->set('tax_query', $tax_query);         }     }     return $query;      } As you can see, I'm also expanding the search to include two custom post types. In the results of a search, the custom post types are added correctly and I can see them in the query that's generated, so I know that the hook and function are being called correctly. The post_tag part of the query is not added though. The WP_Query Object's `query_vars` element correctly (I think) contains the `tax_query`, but the WP_Query Object contains its own `tax_query` which is empty, and the SQL in the `request` also doesn't have it. Here's a (slightly stripped-down) var_dump of the WP_Query Object:               WP_Query Object (     [query_vars] => Array         (             [s] => ecosystem                  [post_type] => Array                 (                     [0] => post                     [1] => resource                     [2] => initiative                 )                  [tax_query] => WP_Tax_Query Object                 (                     [queries] => Array                         (                             [0] => Array                                 (                                     [taxonomy] => post_tag                                     [terms] => Array                                         (                                             [0] => culture-change                                             [1] => peace                                         )                                          [include_children] => 1                                     [field] => slug                                     [operator] => AND                                 )                              )                          [relation] => AND                 )             [search_terms_count] => 1             [search_terms] => Array                 (                     [0] => ecosystem                 )                  [search_orderby_title] => Array                 (                     [0] => jcgy_posts.post_title LIKE '%ecosystem%'                 )                  [order] => DESC         )          [tax_query] => WP_Tax_Query Object         (             [queries] => Array                 (                 )                  [relation] => AND         )          [query] => Array         (             [s] => ecosystem         )          [request] => SELECT SQL_CALC_FOUND_ROWS DISTINCT jcgy_posts.* FROM jcgy_posts  LEFT JOIN jcgy_postmeta as jcgy_postmeta on jcgy_posts.ID = jcgy_postmeta.post_id AND jcgy_postmeta.meta_key = '_EventStartDate' WHERE 1=1  AND (((jcgy_posts.post_title LIKE '%ecosystem%') OR (jcgy_posts.post_content LIKE '%ecosystem%')))  AND jcgy_posts.post_type IN ('post', 'resource', 'initiative') AND (jcgy_posts.post_status = 'publish' OR jcgy_posts.post_author = 1 AND jcgy_posts.post_status = 'private')  ORDER BY jcgy_posts.post_title LIKE '%ecosystem%' DESC, post_date DESC LIMIT 0, 10      All the research I've done tells me that I've structured my addition to the query correctly, yet clearly something isn't working. I am tearing my hair out. Any ideas?


User function to return multiple get_post_meta()

I am trying pass a WP function to a user function, where I can pass a new func argument `$key` for each `post_meta` type here: functions.php                 function my_post_meta($key){           $meta = get_post_meta($post->ID, $key, true);            if ($meta) {            echo $meta . '<br />';                     }          }      page-template.php Edit: These functions will be inside a `foreach()` of `get_posts()`.               my_post_meta("Author");     my_post_meta("Date") .'customise this meta key';     my_post_meta("Address") .'customise this meta key';


Solution to render Shortcodes in Admin Editor

I have asked this question about a year ago and I am hoping there is some type of simple solution which will allow me achieve my objective. So here it goes: I often utilize shortcodes within the Admin Editor but when I turn this over to client they often don't understand how they work. What I am looking for is a solution which would simply automatically render the associating output of shortcodes within the admin WYSIWYG editor. From a visual perspective, I would like for this to display similar to when the "more" line show up or when an image is displayed within the editor. By this I mean that the user would see the output but would only be able to delete it but not edit the content of the rendered shortcode.


wp_editor on front end - JavaScripts not included

I am working on a BuddyPress plug-in for a client that requires users to be able to add content from the front end - they never see the back end for security reasons. I have the plug-in written and it works perfectly but it is missing one thing: a rich text editor so that users can customize their content (within reason, of course). Until now, I have ignored this request from the client and explained it as not being possible without a lot more work. Today, however, I upgraded to 3.3 and noticed the new `wp_editor` tag. I tried some of the examples shown here, but I cannot get any of them to work properly (a bare-bones call produces the editor but the tabs and media buttons don't work, a basic TinyMCE setting array yields nothing [just a plain textarea].) Inspection with Chrome's Developer Tools reveals that some JavaScript files are being included in the admin area that are not included on the front end. What is the best way to include these files and make this thing work? Thanks!


How to Better Control WordPress Cron Jobs?

I have a bunch of standalone WordPress sites, and WordPress Multisite Network of Sites on my server. There are times where there are too many sites all running cron jobs too soon in proximity. I am looking to better control when cron jobs are triggered on each WordPress website. Is it possible to disable WordPress cron jobs from being triggered anywhere, and limit it exclusively to `./wp-cron.php`? If so, how? I would like to setup cron jobs via Linux to target each domain's `./wp- cron.php` file at the times I specify. In theory, this should alleviate most of the server bogging I've been experiencing. Is this an ideal solution to better control the cron jobs on each of my WordPress sites? Is there something I should be doing within WordPress itself, which could better control the cron jobs, so that I don't get too many sites all running their cron jobs at the same time? Trying to conserve server resources, cron jobs are the culprit here.


replacing the_autor or make callback

I'm looking a way tho change the `the_author();` function in the loop, I have post meta data with the name of the user who posted. I need to do this:   * If the user is registered, show `the_author();`, but if isn't show the data from the post meta. Since `the_author()`, function doesn't have a callback function I'm a little lost, maybe making a function? The idea is replace `the_author()` in my theme.


meta_compare not comparing whole integer

I have submitted an integer data via a form to my custom search page. I can get values properly if the input is single char (e.g. 1 ) but if the input is multi char (e.g. 100) it still compares against "1". IF the user input is **1** I get all the posts with custom field value **More than 1**. but If the input is **100** the result is same. _Why is this happening??_ Here is my code::               $i_rate = $_GET["interest_rate"];                          $bc_args = array(                              'post_type' => 'data',                         'data-category'=>'insurance-rate',                         'order' => 'DESC',                         'meta_key' => 'interest_rate',                         'meta_value' =>$i_rate,                         'meta_compare' => '>=',                         'orderby' => 'meta_value_num',                          );                           $sortedPosts = new WP_Query($bc_args);


Instantiate TinyMCE via JS ( rather than PHP/wp_editor )

Once a page has loaded, how do I create a TinyMCE editor? Putting a `wp_editor` call in an AJAX request then displaying it gives this: ![enter image description here](http://i.stack.imgur.com/stnbS.png) Visual and text tabs are nonfunctional, no toolbar, no active TinyMCE instance, just the html markup. I need to instantiate the JS component of TinyMCE, but how? I've also tried making a call in my AJAX response PHP to `_WP_Editors::editor_js();`, and I can see the response in the console using console.log and I see the JS script there, but it is not inserted into the DOM and it is never executed


help on wp_editor via ajax load

So I have been spending hours trying to figure out how to make the wp_editor() work on an ajax generated content. I bumped into this post: Load tinyMCE / wp_editor() via AJAX and tried the solution of Mike Allen. His solution almost solves my problem but then there is a problem with my Text tab, I don't see any button: **screencast.com/t/Emd2Da3UyThO** My Visual tab on the other hand works fine: **screencast.com/t/JGWf4ivZfaGb** Inspected my Text tab, I can see that quicktags aren't there: **screencast.com/t/qyvwWDnuEPnb** But by checking on my window's QTags instances: **screencast.com/t/UAzIaZ7XOc5** The description instance (which is not ajax generated content) has the **theButtons** attribute, while the tabdescription35 (ajax generated) doesn't have one.


Remove pages from backend list *and* update counter accordingly

I hidden some pages using `'parse_query'` hook, but the count for 'Published' pages didn't changed... Where I should hook to change it? ![Update the page status count in admin](http://i.stack.imgur.com/dM7GU.jpg) My code so far:               $query->query_vars['post__not_in'] = array(4);


Adding Multiple Values to a Post Meta Key

I have a question about adding multiple post meta values to a post meta key. Here is a link to the WordPress `add_post_meta();` function in question. The `$unique` parameter is a little on the fuzzy side of clarity for me. > Whether or not you want the key to be unique. When set to true, this will > ensure that there is not already a custom field attached to the post with > $meta_key as its key, and, if such a field already exists, the key will not > be added. If this is set to true, will I be able to add multiple values to a single post meta key? I am looking to create ONE unique post meta key per post. This key is set as a hidden key. (Prefixed with an underscore - Example: `$meta_key = '_task- name';`) Is it possible to add multiple post meta values to this single unique post meta key, in array format? So when I fetch this post meta key from the post using `get_post_meta($post_id, $meta_key);` one post might have 3 or 4 tasks names assigned to it. Would I be better off just using Taxonomies and Terms?


How do I add an admin notice within javascript in the admin interface for posts?

I want to use javascript to add a notice to the top of the wordpress page just like they do when auto-saving the page. But in looking at the DOM, I don't see any special div that I could find to add my notice to: **THIS IS THE DIV WHERE WORDPRESS's NOTICES ARE**

Edit Page Add New

                 The backup of this post in your browser is different from the version below. Restore the backup.

                 Post restored successfully.     Undo.

      Is there a javascript function wordpress has that I can use?


Hide comments and posts posted by other user

I've created a user with role Contributor, when i logged in as Contributor all the posts and comments are listed in the dashboard. How to disable this? I just want to see the post made by me/specific_user. How to do this?


Is it wise not to use only meta capabilities for certain basic post types?

I've been a WP developer for a couple of years now but only recently has the concept of meta vs. primitive capabilities really "clicked" with me. I'm building some tools right now to allow easy creation of new custom post types. Sometimes the sites I build can get pretty extensive - I think my record is something like 11 custom post types on a single site. My question is this: For certain basic custom post types where there is no strong need for security between users (for instance, the site's users are all trusted, or there is only 1 user), is there any issue with just mapping the seven default capabilities to their corresponding meta cap?   (e.g. `'edit_others_posts' => 'edit_post'`) The idea is that I would have 3 possible permission configurations for a custom post type depending on what is needed:   1. A basic one, mapping each of the 7 capabilities to one of the the 3 meta caps   2. An intermediate one, with each of the 7 standard capabilities mapped to a corresponding one for the post type (like posts and pages)   3. An advanced one, where `map_meta_cap` is true on the post type, containing ~14 mapped capabilities The main problem I am trying to solve is extreme clutter when using the role editor. As you can imagine, when you have 11 custom post types each with 7 capabilities, it gets pretty full - and maybe four out of five times, it's either "all on" or "all off" for a CPT on a role-by-role basis. I don't quite want to move to a single capability for those, but this gets me most of the way there.


Shortcode returning specific content of a post

I'm currently building a plugin to display specific part of post after accepting verification code. Can a shortcode return a part of a post? I mean: Bla bla bla [shortcode postID="100"] Special bla bla [/shortcode] Bla bla How to code a function to retrieve specific content of a post only when the plugin calls this shortcode?


Adding html elements to wp nav menu

I know how to create wp menus using the functions.php and diaplay it in my sote wherever the menu is required (e.g top menu, footer menu) I even know how to style it using custom CSS. I would like to know if it's possible to add HTML elements to a dynamic custom menu. for example: I want to build a menu when each **li** item will look like this:
number here
post title
     ///
name of the author

      is there a way or function to output such menu? basically add some extra html inside **li** item? also inside the:               number here      I would like to add a counter which will display a number for each posts (1-5) Any help will be appreciated Thanks


Close the media-upload thickbox right after upload is finished?

I'm working on a front-end uploader using WP's own media-uploading functions. All is well, except that I just want to simplify some UI things, like removing tabs and unnecessary information for my users. Most importantly, I'd like to magically close the Upload Thickbox once the uploads are done and the files are crunched. I'm aware of the `add_attachment` hook and I'm already using it to do some ImageMagick handling, but it fires every time a file is uploaded, so this is kind of too much. Seaching through core, I got to wp-includes/js/swfupload/handlers.dev.js and around line 232 there's this:               function uploadComplete(fileObj) {         // If no more uploads queued, enable the submit button         if ( swfu.getStats().files_queued == 0 ) {             jQuery('#cancel-upload').prop('disabled', true);             jQuery('#insert-gallery').prop('disabled', false);         }     }      This is precisely where I want to hook so that, instead of enabling the submit button, I'd just fire `TB_close()`. Can this be done in any way?


Post in Multiple Categories to stay in current category (permalink, next previous post link)

I guess this has been mentioned before, but after 2 days of browsing i haven't find a complete solution. Maybe someone has come across this problem before? I'm building a designer portfolio where posts are assigned to more than one categories. Permalinks are set in the form of: > portfolio.com/category-name/post-name/ Example:   * Post 1   * Assigned to Category A and Category B When you visit the Category A page, Post 1 is shown there. When you visit the Category B page, Post 1 is shown there too. The problem: When you click Post 1 in the Category A page. It takes you normally to the Post 1 page staying in Category A that is the lower ID category, so permalink is: > portfolio.com/category-a/post-1/ and next previous post links work inside Category A ok. When you click Post 1 in the Category B page, it takes you normally to the Post 1 page but not staying in Category B, the permalink is still at Category A > portfolio.com/category-a/post-1/ and next previous post links work inside Category A again. How can i resolve this so when you are in a category page and you click a post that is assigned to multiple categories, the post page will stay in the category from which it was clicked, the permalink will show that category name and the previous and next post links will work inside that category and not the default lower ID category that WordPress is using by default? I'm really looking forward for a nice solution! Strange that WordPress awesomeness has no option by default on this, since it supports multiple categories. Thanks!


WordPress plugin admin page - using WordPress function in linked php file

Asked this question on StackOverflow and they directed me over yonder... nice place ya got here =) I've been developing a pretty simple WordPress plugin, and wanted to do some live validation of certain fields on the page, which is where I am stuck. I've been looking everywhere for something that worked, and I simply can't make it function. I've been trying to get the ajax to function properly and I know I'm missing something obvious, I just can't figure it out. The main function file includes this to register my js file.               function on_screen_validation() {         wp_enqueue_script( "field_validation", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/field-validation.js"), array( 'jquery' ) );     }     add_action( 'admin_print_scripts', 'on_screen_validation' );      The js runs this code to capture the onblur command and pass the value to the php validation file.               jQuery(document).ready(function() {         //run field validation on username on blur         jQuery('.valusername').blur(function() {                  var usernameID = jQuery(this).attr('id');             var usernameVal = jQuery('#'+usernameID).val();             var thisFunction = 'validateUserName';                  jQuery.post("mywebaddress...validation.php",{Function: thisFunction, thevars: usernameVal}, function(data) {                  alert(data); //would update validation message here             });         });     });      And the validation.php script looks like this:               if(isset($_POST['Function'])){         call_user_func($_POST['Function'], $_POST['thevars']);     }          function validateUserName($username){           if ( username_exists($username) ) {            echo $username.' does exist';         } else {            echo $username.' doesnt exist';        }     }      Obviously I'm just using alerts for now to make sure the data is being checked properly. If I take out the WordPress username_exists function, and just echo back a string, it works fine. But with username_exists, it creates a 500 internal server error. I need to know how to get this external validation.php file to recongnise WordPress functions (I think), and nothing I've found so far will work. Thanks for reading... sorry for the long explanation I just wanted to make sure the context was all there so it made sense (I hope!)! Cheers, Matt


Embed HTML5 files/subfolders in post?

I am attempting to publish an Adobe Captivate project to a WordPress blog. The .swf file is easy enough to handle, but the HTML5 version is giving me problems. The way that Captivate outputs HTML5 is as a folder that includes an index.html file and other folders with various resources that are references in the index.html file (e.g., as ./images/picture.jpg). I have several goals, in decreasing order of importance: 1) Be able to insert the HTML5 content into a WordPress post (including uploading the content). 2) Have the content "window" automatically fill the area WordPress has available, as if it were a simple video. (I ask this question because I tried using iFrames and they have a fixed size, unless I'm missing an option). 3) Be able to restrict access so that someone can only access the file through the WordPress post (rather than, say, directly following the URL for the index.html file). Is this possible?


Using %postname% tag with a Custom Permastruct creates 400 Bad Request Errors from the server

This is related to another question that I had asked earlier. I'm doing some rewrite code to create some custom permalinks for a custom post type. I think I'm getting it mostly working except I'm getting the following error: ![400 Bad Request](http://i.stack.imgur.com/rhEhy.jpg) I noticed a few things:   1. Whatever I have as the postname gets replaced in the url field as %postname%   2. If I omit the post name, it loads up in WordPress no problem Here is the code to setup the rewrite:               add_action('init', 'setup_rewrites');     function setup_rewrites() {             global $wp_rewrite;             //Content             add_rewrite_tag('%seriesname%','([^/]+)');             add_rewrite_tag('%contenttype%','([^/]+)');             $content_struct = '/content/%seriesname%/%contenttype%/%postname%';             add_permastruct('veda_content', $content_struct, false);              }      an example url that doesn't work but should: http://watchonepiecelegally.com/content/one-piece/episode/test-1 A URL that does work: http://watchonepiecelegally.com/content/one- piece/episode/ What I get via Jan Fabry's Rewrite Analyzer plugin: ![enter image description here](http://i.stack.imgur.com/U7wlj.jpg) This should work but I'm missing something. Can anyone give me a hand? EDIT: As requested, here are the rewrite rules Wordpress is generating. Hopefully this helps:               Array     (         [category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2]         [category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2]         [category/(.+?)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2]         [category/(.+?)/?$] => index.php?category_name=$matches[1]         [tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2]         [tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2]         [tag/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tag=$matches[1]&paged=$matches[2]         [tag/([^/]+)/?$] => index.php?tag=$matches[1]         [type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2]         [type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2]         [type/([^/]+)/page/?([0-9]{1,})/?$] => index.php?post_format=$matches[1]&paged=$matches[2]         [type/([^/]+)/?$] => index.php?post_format=$matches[1]         [anime-series/.+?/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime-series/.+?/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime-series/.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-series/.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-series/.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime-series/(.+?)/trackback/?$] => index.php?veda_series=$matches[1]&tb=1         [anime-series/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_series=$matches[1]&feed=$matches[2]         [anime-series/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_series=$matches[1]&feed=$matches[2]         [anime-series/(.+?)/page/?([0-9]{1,})/?$] => index.php?veda_series=$matches[1]&paged=$matches[2]         [anime-series/(.+?)/comment-page-([0-9]{1,})/?$] => index.php?veda_series=$matches[1]&cpage=$matches[2]         [anime-series/(.+?)(/[0-9]+)?/?$] => index.php?veda_series=$matches[1]&page=$matches[2]         [anime-release/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime-release/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime-release/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-release/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-release/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime-release/([^/]+)/trackback/?$] => index.php?veda_release=$matches[1]&tb=1         [anime-release/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_release=$matches[1]&feed=$matches[2]         [anime-release/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_release=$matches[1]&feed=$matches[2]         [anime-release/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_release=$matches[1]&paged=$matches[2]         [anime-release/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?veda_release=$matches[1]&cpage=$matches[2]         [anime-release/([^/]+)(/[0-9]+)?/?$] => index.php?veda_release=$matches[1]&page=$matches[2]         [anime-release/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime-release/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime-release/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-release/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-release/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime_video/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime_video/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime_video/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_video/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_video/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime_video/([^/]+)/trackback/?$] => index.php?veda_video=$matches[1]&tb=1         [anime_video/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_video=$matches[1]&feed=$matches[2]         [anime_video/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_video=$matches[1]&feed=$matches[2]         [anime_video/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_video=$matches[1]&paged=$matches[2]         [anime_video/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?veda_video=$matches[1]&cpage=$matches[2]         [anime_video/([^/]+)(/[0-9]+)?/?$] => index.php?veda_video=$matches[1]&page=$matches[2]         [anime_video/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime_video/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime_video/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_video/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_video/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime_purchase/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime_purchase/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime_purchase/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_purchase/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_purchase/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime_purchase/([^/]+)/trackback/?$] => index.php?veda_purchase=$matches[1]&tb=1         [anime_purchase/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_purchase=$matches[1]&feed=$matches[2]         [anime_purchase/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_purchase=$matches[1]&feed=$matches[2]         [anime_purchase/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_purchase=$matches[1]&paged=$matches[2]         [anime_purchase/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?veda_purchase=$matches[1]&cpage=$matches[2]         [anime_purchase/([^/]+)(/[0-9]+)?/?$] => index.php?veda_purchase=$matches[1]&page=$matches[2]         [anime_purchase/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime_purchase/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime_purchase/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_purchase/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime_purchase/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime-review/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime-review/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime-review/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-review/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-review/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [anime-review/([^/]+)/trackback/?$] => index.php?veda_review=$matches[1]&tb=1         [anime-review/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_review=$matches[1]&feed=$matches[2]         [anime-review/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_review=$matches[1]&feed=$matches[2]         [anime-review/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_review=$matches[1]&paged=$matches[2]         [anime-review/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?veda_review=$matches[1]&cpage=$matches[2]         [anime-review/([^/]+)(/[0-9]+)?/?$] => index.php?veda_review=$matches[1]&page=$matches[2]         [anime-review/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]         [anime-review/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [anime-review/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-review/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [anime-review/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [subtitle_language/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_subtitle_language=$matches[1]&feed=$matches[2]         [subtitle_language/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_subtitle_language=$matches[1]&feed=$matches[2]         [subtitle_language/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_subtitle_language=$matches[1]&paged=$matches[2]         [subtitle_language/([^/]+)/?$] => index.php?veda_subtitle_language=$matches[1]         [audio_language/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_audio_language=$matches[1]&feed=$matches[2]         [audio_language/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_audio_language=$matches[1]&feed=$matches[2]         [audio_language/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_audio_language=$matches[1]&paged=$matches[2]         [audio_language/([^/]+)/?$] => index.php?veda_audio_language=$matches[1]         [genre/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_genre=$matches[1]&feed=$matches[2]         [genre/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_genre=$matches[1]&feed=$matches[2]         [genre/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_genre=$matches[1]&paged=$matches[2]         [genre/([^/]+)/?$] => index.php?veda_genre=$matches[1]         [studio/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_studio=$matches[1]&feed=$matches[2]         [studio/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_studio=$matches[1]&feed=$matches[2]         [studio/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_studio=$matches[1]&paged=$matches[2]         [studio/([^/]+)/?$] => index.php?veda_studio=$matches[1]         [content_type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_content_type=$matches[1]&feed=$matches[2]         [content_type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_content_type=$matches[1]&feed=$matches[2]         [content_type/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_content_type=$matches[1]&paged=$matches[2]         [content_type/([^/]+)/?$] => index.php?veda_content_type=$matches[1]         [publisher/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_publisher=$matches[1]&feed=$matches[2]         [publisher/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_publisher=$matches[1]&feed=$matches[2]         [publisher/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_publisher=$matches[1]&paged=$matches[2]         [publisher/([^/]+)/?$] => index.php?veda_publisher=$matches[1]         [release_type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_release_type=$matches[1]&feed=$matches[2]         [release_type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_release_type=$matches[1]&feed=$matches[2]         [release_type/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_release_type=$matches[1]&paged=$matches[2]         [release_type/([^/]+)/?$] => index.php?veda_release_type=$matches[1]         [release_rating/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_rating=$matches[1]&feed=$matches[2]         [release_rating/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_rating=$matches[1]&feed=$matches[2]         [release_rating/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_rating=$matches[1]&paged=$matches[2]         [release_rating/([^/]+)/?$] => index.php?veda_rating=$matches[1]         [video_source/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_video_source=$matches[1]&feed=$matches[2]         [video_source/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_video_source=$matches[1]&feed=$matches[2]         [video_source/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_video_source=$matches[1]&paged=$matches[2]         [video_source/([^/]+)/?$] => index.php?veda_video_source=$matches[1]         [retailer/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_retailer=$matches[1]&feed=$matches[2]         [retailer/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?veda_retailer=$matches[1]&feed=$matches[2]         [retailer/([^/]+)/page/?([0-9]{1,})/?$] => index.php?veda_retailer=$matches[1]&paged=$matches[2]         [retailer/([^/]+)/?$] => index.php?veda_retailer=$matches[1]         [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [content/[^/]+/[^/]+/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [content/([^/]+)/([^/]+)/([^/]+)/trackback/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&name=$matches[3]&tb=1         [content/([^/]+)/([^/]+)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&name=$matches[3]&feed=$matches[4]         [content/([^/]+)/([^/]+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&name=$matches[3]&feed=$matches[4]         [content/([^/]+)/([^/]+)/([^/]+)/page/?([0-9]{1,})/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&name=$matches[3]&paged=$matches[4]         [content/([^/]+)/([^/]+)/([^/]+)(/[0-9]+)?/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&name=$matches[3]&page=$matches[4]         [content/[^/]+/[^/]+/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]         [content/[^/]+/[^/]+/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [content/[^/]+/[^/]+/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [content/[^/]+/[^/]+/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [content/[^/]+/[^/]+/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [content/([^/]+)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&feed=$matches[3]         [content/([^/]+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&feed=$matches[3]         [content/([^/]+)/([^/]+)/page/?([0-9]{1,})/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]&paged=$matches[3]         [content/([^/]+)/([^/]+)/?$] => index.php?seriesname=$matches[1]&contenttype=$matches[2]         [content/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?seriesname=$matches[1]&feed=$matches[2]         [content/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?seriesname=$matches[1]&feed=$matches[2]         [content/([^/]+)/page/?([0-9]{1,})/?$] => index.php?seriesname=$matches[1]&paged=$matches[2]         [content/([^/]+)/?$] => index.php?seriesname=$matches[1]         [robots\.txt$] => index.php?robots=1         [.*wp-atom.php$] => index.php?feed=atom         [.*wp-rdf.php$] => index.php?feed=rdf         [.*wp-rss.php$] => index.php?feed=rss         [.*wp-rss2.php$] => index.php?feed=rss2         [.*wp-feed.php$] => index.php?feed=feed         [.*wp-commentsrss2.php$] => index.php?feed=rss2&withcomments=1         [feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]         [(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]         [page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]         [comments/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]&withcomments=1         [comments/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]&withcomments=1         [comments/page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]         [search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?s=$matches[1]&feed=$matches[2]         [search/(.+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?s=$matches[1]&feed=$matches[2]         [search/(.+)/page/?([0-9]{1,})/?$] => index.php?s=$matches[1]&paged=$matches[2]         [search/(.+)/?$] => index.php?s=$matches[1]         [author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?author_name=$matches[1]&feed=$matches[2]         [author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?author_name=$matches[1]&feed=$matches[2]         [author/([^/]+)/page/?([0-9]{1,})/?$] => index.php?author_name=$matches[1]&paged=$matches[2]         [author/([^/]+)/?$] => index.php?author_name=$matches[1]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]         [([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]         [([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]         [([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]         [([0-9]{4})/([0-9]{1,2})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]         [([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&feed=$matches[2]         [([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&feed=$matches[2]         [([0-9]{4})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&paged=$matches[2]         [([0-9]{4})/?$] => index.php?year=$matches[1]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&tb=1         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&paged=$matches[5]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&cpage=$matches[5]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&cpage=$matches[4]         [([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&cpage=$matches[3]         [([0-9]{4})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&cpage=$matches[2]         [.+?/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]         [.+?/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1         [.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]         [.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]         [(.+?)/trackback/?$] => index.php?pagename=$matches[1]&tb=1         [(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?pagename=$matches[1]&feed=$matches[2]         [(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?pagename=$matches[1]&feed=$matches[2]         [(.+?)/page/?([0-9]{1,})/?$] => index.php?pagename=$matches[1]&paged=$matches[2]         [(.+?)/comment-page-([0-9]{1,})/?$] => index.php?pagename=$matches[1]&cpage=$matches[2]         [(.+?)(/[0-9]+)?/?$] => index.php?pagename=$matches[1]&page=$matches[2]     )      %seriesname% is a slug that coincides with the parent of the post. %contenttype% coincides with a custom taxonomy. The idea was that if the %postname% tag was omitted, those two other tags could be used to create an archive page. EDIT: Making progress. As noted in the discussion in the comments, using the builtin %postname% tag with a custom permastruct seems to be the cause of my 400 Bad Request Errors. Hopefully this should narrow down what the problem seems to be.


How can I dynamically load another page template to provide an alternate layout of the posts?

I have a page that displays posts (4 on each row), with a thumbnail image & title for each. Is it possible to click a text/icon link and dynamically switch the page template? I'm looking to provide an alternate view of the posts, perhaps with larger images, more text/custom fields added etc. I thought it would be easy just to link to another page template but it changes the url (would like the url to stay the same) and for some reason it loads the closest matching post, rather than the new page template (I have the page template nested within the first). Something like this domain.com/page/?view=list


GrandParent ,Parent, Child issue

I have the following               GrandParent     -Parent01     --Child     -Parent02     --Child     --Child     -Parent03     --Child      I wish to find a solution that when Im on the Grandparent page, that it will only return the parents and not the children IE.               GrandParent     -Parent01     -Parent02     -Parent03      This is the code I have at present, and it produces all parents and children of the grandparent page, and places them into a table.               <?php $postid = get_the_ID(); ?>      <?php /* $pages = get_pages(array('child_of' =>$postid)); */     $pages = get_children(array(      'numberposts' =>30,     'post_parent' => $heading_page->post_id      ));     $tCount= 0;     ?>

     <?php foreach ($pages as $page): ?>     <?php     if($tCount % 2 == 0)      {         echo '

';     }?>

     <a href="<?php echo get_permalink($page->ID); ?>">             <?php echo get_the_post_thumbnail($page->ID, array(300,250)); ?>
        <a href="<?php echo get_permalink($page->ID); ?>"><?php echo $page-   >post_title ?>

        	      <?php $tCount++; endforeach; ?>


Join inside a wpdb query.. confused!

I need to get a return from a query that provides me with email, username or nicename as well as post title based on author id. The query is to run once daily via cron and look for posts that have spent a specific live time before they come up for removal (the query is intended to run five days and then three days before post deletion). so far i have this which works (almost) via running manual queries in phpmyadmin.               SELECT ID, user_email, display_name, user_nicename     FROM wp_users     WHERE ID     IN (SELECT post_author FROM wp_posts WHERE post_type = 'sales' AND HOUR( TIMEDIFF( NOW( ) , post_date_gmt ) ) >=1)        alls well and good here, it returns success however what i now need to get is also the post_titles of all the posts due for expiry so that it can be added inside the $message part of the wp_mail. Im going to be honest with you i havent a clue about joining stuff. whether it needs left joins, outside joins or any other kind of join there maybe, the only info i seem to keep getting back from codex **is this page** **Update**               <?php     $emailusers = $wpdb->get_results("SELECT ID, user_email FROM $wpdb->users WHERE ID IN (SELECT post_author FROM $wpdb->posts WHERE post_type = 'sales' AND HOUR( TIMEDIFF( NOW( ) , post_date_gmt ) ) >=1)");          foreach ($emailusers as $user) {     // do wp_mail stuff from here     }     ?>      Full working code **below** for anyone who is interested:               <?php      require_once 'wp-load.php';          global $wpdb;          $emailusers = $wpdb->get_results("SELECT u.user_nicename, u.user_email, p.post_title,  p.post_date     FROM $wpdb->posts p     INNER JOIN $wpdb->users u ON p.post_author = u.ID     WHERE post_type = 'sales' OR post_type = 'rentals' OR post_type = 'business'     AND HOUR( TIMEDIFF( NOW( ) , post_date_gmt ) ) >=721");               foreach ($emailusers as $user) {          $to = $user->user_email;          $subject = $user->post_title;          $message = 'You have a property listing that will auto expire in 3 days, the property is ' . $user->post_title .' and was listed on ' . $user->post_date .'' . "\r\n";               $headers .= "From: -------- <www.------------.com>" . "\r\n";               wp_mail( $user_email, $subject, $message, $headers);          }               ?>        The code up above will notify the author @ 720 hours that they have 3 days remaining before the post is auto deleted. regards


Take stored email addresses from custom post type & turn into one string

I have a custom post type, which has email and names stored. I would like to take these email addresses and concatenate (join them) together into a single string. This string will be stored in a variable, and I will then assign this variable to the `$email_to` in wp_mail. Using a cron, the latest 3 posts will then be sent to the email addresses over a chosen frequency. My Q: I am just looking for someone to point me in the right direction. Should I use a `foreach` to loop through all of these stored email addresses in the custom post type, and then concatenate them to the string stored in the variable? **UPDATE** I am not looking for someone to provide the code (that would be unreasonable). I am looking for a yes or no, & a little bit of guidance if possible.


How do I handle multiple Submit buttons in plugin's option page?

I'm developing my first plugin for WordPress and I'm getting a grasp of the whole hook system. I'm now stuck on a (probably) small issue, that I could possibly circumvent, but I'm afraid of coming out with a "hack", more than a real solution. What I'm trying to do is putting two submit buttons on my Options page:   * Save   * Draft Both of them would have to do something common (i.e. Saving the content of the form), but then they should take different action with such content. So far, I managed to ouput the two buttons using the following code:               echo '<form id="my_plugin_settings_form" method="post" action="options.php">';     settings_fields('my_plugin_settings');     do_settings_sections('my_plugin_settings');     submit_button(__('Save', 'MyPlugin'), 'Save');     submit_button(__('Draft', 'MyPlugin'), 'secondary','Draft');     echo '</form>';      I also implemented a validate method, which correctly receives the posted fields:               public function validate_settings($settings) {       var_dump($settings); // Here I can see all posted fields     }      The above works well, with all the data being saved correctly in WordPress Options table. However, I would like to "intercept" the data being saved to manipulate it. I was thinking of manipulating the data within the `validate_settings()` method, but the button that was clicked is **not** included in the settings passed as an argument. I could simply parse the `$_POST` array to get it, but I'm having the doubt that the approach is a bit of a hack and, that, perhaps, I should implement a proper hook, somewhere else. My question, therefore, is: where should I put my code to process the data posted from an Options page? Is there a specific hook I should use? Thanks in advance for the answers.


WordpressUser Submission Form

I have a User Post Submission form, and it has three issues, as well as one potential issue. Here is the code that processes the form.               <?php if(isset($_POST['user_submission_form'])) {              if(wp_verify_nonce($_POST['user_submission_form'], 'user_submission_form')) {                  $user_submitted_title = sanitize_text_field($_POST['user_submitted_title']);             $user_submitted_progress = $_POST['user_submitted_progress'];             $user_submitted_goals = $_POST['user_submitted_goals'];             $user_submitted_categories = $_POST['user_submitted_categories'];             $user_submitted_tags = sanitize_text_field($_POST['user_submitted_tags']);             $user_submitted_video = sanitize_text_field($_POST['user_submitted_video']);             $user_submitted_audio = sanitize_text_field($_POST['user_submitted_audio']);                  if(($user_submitted_title != '') && ($user_submitted_progress != '') && ($user_submitted_goals != '') && ($user_submitted_categories != '') && ($user_submitted_tags != '')) {                      $user_post = array(                     'comment_status' => 'open',                     'post_author'    => $user_ID,                     'post_category'  => array($user_submitted_categories),                     'post_content'   => '
Project Progress
' . $user_submitted_progress . '
Project Goals
' . $user_submitted_goals,                     'post_status'    => 'publish',                     'post_title'     => $user_submitted_title,                     'post_type'      => 'post',                     'tags_input'     => $user_submitted_tags                 );                      $user_post_id = wp_insert_post($user_post);                 add_post_meta($user_post_id, 'wpcf-video', $user_submitted_video);                 add_post_meta($user_post_id, 'wpcf-audio', $user_submitted_audio);                      global $post;                 if ( $_FILES ) {                     $files = $_FILES['upload_attachment'];                     foreach ($files['name'] as $key => $value) {                         if ($files['name'][$key]) {                             $file = array(                                 'name' => $files['name'][$key],                                 'type' => $files['type'][$key],                                 'tmp_name' => $files['tmp_name'][$key],                                 'error' => $files['error'][$key],                                 'size' => $files['size'][$key]                             );                             $_FILES = array("upload_attachment" => $file);                             foreach ($_FILES as $file => $array) {                                 $newupload = insert_attachment($file,$user_post_id);                             }                         }                     }                 }                      $user_post_redirect = get_permalink($user_post_id);                 wp_redirect($user_post_redirect); exit;                  }                  else {                 //Notify the user that they must fill out all required fields             }              }              else {             print 'Sorry, your post did not verify.';             exit;         }          }?>          <?php get_header(); ?>      Here is the form (after the header)               <?php if (is_user_logged_in()) { ?>              <form id="user_submitted_post" action="" method="POST" enctype="multipart/form-data">                  <input type="hidden" name="user_submission_form" value="<?php echo wp_create_nonce('user_submission_form'); ?>">
Title
             <input type="text" id="user_submitted_title" name="user_submitted_title">
Please provide detailed information about the long-term goals of your project, as well as your current project progress. Feel free to format your text using boldness, italics, lists, and block quotes. Simply click on the formatting option you'd like to use and start typing. When you no longer need the format you have selected, hit enter to go to the next line, and click on the active format button to end formatting.

Project Progress
             <?php wp_editor( '', 'user_submitted_progress', $settings = array('media_buttons' => false, 'quicktags' => false, 'textarea_rows' => 15, 'editor_css' => '', 'tinymce' => add_filter("mce_buttons", "base_extended_editor_mce_buttons", 0), add_filter("mce_buttons_2", "base_extended_editor_mce_buttons_2", 0)) ); ?>
Project Goals
             <?php wp_editor( '', 'user_submitted_goals', $settings = array('media_buttons' => false, 'quicktags' => false, 'textarea_rows' => 15, 'tinymce' => add_filter("mce_buttons", "base_extended_editor_mce_buttons", 0), add_filter("mce_buttons_2", "base_extended_editor_mce_buttons_2", 0)) ); ?>
Category
             <?php wp_dropdown_categories($args = array('orderby' => 'name', 'hide_empty' => 0, 'hierarchical' => 1, 'id' => 'user_submitted_categories', 'name' => 'user_submitted_categories')); ?>
Tags

Separate tags with commas.
             <input type="text" id="user_submitted_tags" name="user_submitted_tags">
Video

Copy and paste links from Youtube and Vimeo in the field below
             <textarea id="user_submitted_video" name="user_submitted_video"></textarea>
Audio

Copy and paste links from Soundcloud in the field below
             <textarea id="user_submitted_audio" name="user_submitted_audio"></textarea>
Images
             <input type="file" name="upload_attachment[]" multiple="multiple">                  <button name="submit">Submit</button>              </form>          <?php } else { ?>              <?php echo 'Sorry, but you need to be logged in to see that. You can          <?php echo wp_login_url( get_permalink() ); ?>         <?php echo '" title="Login">login here'; ?>          <?php } ?>      And here is the function in functions.php that attaches the images to the post in the database               //Attach Image to Post in Database     function insert_attachment($file_handler,$user_post_id,$setthumb='false') {         if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false();          require_once(ABSPATH . "wp-admin" . '/includes/image.php');         require_once(ABSPATH . "wp-admin" . '/includes/file.php');         require_once(ABSPATH . "wp-admin" . '/includes/media.php');         $attach_id = media_handle_upload($file_handler, $user_post_id);         if ($setthumb) update_post_meta($user_post_id,'_thumbnail_id',$attach_id);         return $attach_id;     }      When the post is successful, i get an error saying cannot modify headers, but the form does process and the content is posted to the database. When the users don't fill out all of the required fields, the page refreshes, and the form is completely empty, so they lose their progress on the form and have to start over. The part that says               //Notify the user that they must fill out all required fields      is where I want to put the event that occurs on validation failure. I'd like it to just be a simple alert popup or something that says Fill out all required fields. Nothing beyond that will be necessary. It also has an issue in that if you hit the submit button repeatedly, it will process the post as many times as you click the submit button, creating duplicate posts. How can I fix that? My only remaining question is whether or not the image uploader can be exploited in this scenario.


Output posts with same name as tags?

If someone puts a post on my site, they usually do that with some tags. If someone posts a post with the tag "hello", I want it to output that tag after my content and let it link to the archive page where it queries to see if there is another post with the same tag --> this already works! What I now want is this: say there is also a post named "hello", now I want to get both the described tag above as well as a "see also [post] hello"... So I use the given tag as it does in default, but now I want to output the same tag again, but this time linking to the post with the same name... Is this possible? If so, how? I tried editing the code that is given here: Redirect Tag to Post with the same name but I do not know how I can output the same tag, that does two different things.


Custom wysiwyg editor doesn't execute shortcodes?

I encounter this weird problem.. I'm trying to create a simple & easy website for a client. He wants to embed video's into the page. I use different customfields assigned to specific elements in the website. I hide the standard wordpress wysiwyg editor and registred a new one to put it in line with other customfields. Here is the problem, when i use the shortcode icons made by plugins and i post them in the registered wysiwyg editor and i save the page, it doesn't work, it only shows the short-code. Example short-code:               [pro-player width='600' height='600' type='video']http://www.youtube.com/watch?v=-nOjUXGCREs[/pro-player]      But when i use the short-code in the original wordpress wysiwyg editor it does execute it properly. Ofcourse when i call the plugins short-code throughout a .PHP file it definitely works.. But i want to keep it easy & simple for the client to understand, so an generated icon would be my best bet. Why does he custommade wysiwyg editor execute short-codes as text ? I hope someone can help me with this problem. Greetz


WP_Query meta_query by array key

I have a custom post type with its meta in an array. What I need to do is query based on the value of a key in that meta array.               $args = array(         'post_type'         => 'my-cpt',         'posts_per_page'    => -1,         'orderby'           => 'meta_value',          // Sort by this value         'meta_key'          => 'my_meta_array',       // Sort by this meta key         'meta_query'        => array(             array(                 'key'       => 'key here',            // WHAT GOES HERE?                 'value'     => array( 'meta-value' ),             )         )     );              $query = new WP_Query( $args );      What goes in the meta_query key, if my key is my_meta_array[key]? FYI: the keys are indexed by my_meta_array[key], stored in the db via update_post_meta( $post_id, 'river_helpers', 'my_meta_array' ), and retrieved via get_post_meta( $post->ID, 'my_meta_array', true );


User role editor - Add download files capability

I've got User Role Editor plugin installed and i want to add a capability for download files. I've got some downloads in a custom post type called 'products'. I want only people who are logged in to be able to download or view these files. If a user isn't logged in they get redirected to a login/registration page, then they log in and get redirected back to the product page. User role editor has a capability for upload files so was wondering if it can be used to download files as well. Or should i use some other plugin or something to get this? Thanks


Can email address be used as user name?

Is it possible to do something to WP so that I'm able to use the e-mail address as username? I do not want to download a plugin for this.


Show image next to the comment author if have certain role

I want to create a badge image for comment author of a certain role, say, Editor. I want to style comments of users with the Editor role differently than comments of non-registered or lower-level users. For instance, I'd like to have an image appear next to his/her name. I can do the whole thing in CSS, but I want a bit more flexibility so I can add more juice. How can I do it with a conditional tag? Any ideas?


Custom theme/plugin update checks

At the moment, Wordpress checks the wordpress core for it's updates. But, I'd like to add an additional check to repeat the process for themes and plugins using a seperate address, for updating themes that are not on the core wordpress repositories, such as commercial themes and such. Is this possible? If so how would it be done?


Change number of widget columns in dashboard?

I removed some widgets from the dashboard in the wrong way (using `unset()` on `$wp_meta_boxes`) and as a side effect my dashboard widget area is now split into 4 columns, but with just the first 2 having the normal default widgets in, thus the page is squashed. Is there a way to change the amount of widget columns in the dashboard? They are all active as I can drag and drop the widgets around, but now 4 is too many. I am using Wordpress 3.1.3 so don't have the new admin interface yet.


How do i make a sidebar background color?

With the 20-11 theme i would like to make the sidebar one long color. I have no idea how long my page are and i need the sidebar height to be the same as the post height. Right now when i do `#secondary { background-color: green; }` the green is only as long as it needs to be so it is extremely short. How do i get it all the way down?