title: Custom Post Type not showing anything added by code anymore?

text: So I have a piece of code written and it worked before, hasn't been edited hasn't been changed, no updates on the WP DB no updates on any plugin on WP and it's suddenly not working correctly. This is the code:                 $column1   = "member_name";       $column2   = "memberID";       $meta_key  = "field_dsfsd332dsfd";       $result    = $newdb->get_results("SELECT ".$column1.",".$column2."  FROM members LIMIT 1");                  if(isset($_POST['submit'])){             foreach ($result as $c) {                 $postargs = array(                     'post_title'   => $c->member_name,                     'post_status'  => 'draft',                     'post_type'    => 'bedrijf'                 );                      $thisid = wp_insert_post ( $postargs, true);                      if ( is_wp_error($thisid) ) {                     return get_error_codes();                 } else {                       update_field( $meta_key, $c->memberID, $thisid);                 }               }             }      So what happens is that the code inserts into my Custom Post type from another DB, as a result you'll see a new Post there and a filled in title+custom post field. What goes wrong is that it inserts it in the Database of WP (as it shows on view posts as All(3) if for example 3 are inserted) but it does not show up as editable in WP-Admin at all! Although when I manually add a post to the Custom Post type by for example clicking "Add New" it shows it perfectly fine as well as it changes into All(4) but with only one shown(the one I made manually). Why is this happening? MAJOR EDIT: So I found out changing it to `draft` causes the issue to not show up AT ALL. I have no idea why this is so and would appreciate explanation but for now it's working with `Publish`. EDIT2: So I solved it by writing `draft` with capitol D so `Draft` only works..(Strange it should work without either).


title: How to determine which registered sidebar area a custom widget is loaded into

text:
I have a custom widget that I want to apply conditional logic to, depending on its parent sidebar's registered ID. For example, my theme has 6 registered sidebar widget areas. I have a custom widget that may be loaded into any of these 6 sidebar widget areas. Is there a way that I can script the widget code below in order to determine if the widget is loaded into one or more of the registered sidebar widget areas? For example, I'm registering my sidebar widget areas like so:               register_sidebar(array(         'name' => 'Footer Area One',         'id' => 'home-footer-widget',         'description' => __( 'Appears just above the main footer area. Spans across the entire width of page'),         'before_widget' => '
',         'after_widget' => '
',         'before_title' => '
',         'after_title' => '
',     ));          register_sidebar(array(         'name' => 'Footer Area Two',         'id' => 'footer-two',         'description' => __( 'Appears just above the main footer area. Spans across the entire width of page'),         'before_widget' => '
',         'after_widget' => '
',         'before_title' => '
',         'after_title' => '
',     ));      And I have a custom widget which has this code:               function widget( $args, $instance ) {         extract($args);         $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );         $text = apply_filters( 'widget_text', $instance['text'], $instance );         $hide_title = isset( $instance['hide_title'] ) ? $instance['hide_title'] : false;         $filter = isset( $instance['filter'] ) ? $instance['filter'] : false;         echo $before_widget;         if ( $title && !$hide_title )echo $before_title . $title . $after_title;         if ( $text ) echo $filter ? wpautop($text) : $text;         echo $after_widget;     }      And I want to place code into the function widget() that determines if the widget is in either of the two named registered sidebar widgets above. If it does happen to be in one of those two named sidebars, I will not echo the before/after widget code in that case.


title: Creating and populating custom nav menu (menu-item-position not working)

text: Im automatically creating pages with the below code, after that I create a custom menu and insert all the pages to this menu.               $create_pages = array('Home', 'About', 'Contact'); // there will be more items     $count = 1;      foreach ($create_pages as $new_page) {         $add_pages = array(             'post_title' => $new_page,             'post_content' => '',             'post_status' => 'publish',             'post_type' => 'page',             'menu_order' => $count++ // incrementing the order value to overwrite default alphabetical ordering         );         $page_id = wp_insert_post($add_pages);     }      So far I managed to actually overwrite the default alphabetical ordering and now on the Pages screen, all the pages are ordered the way I want.               $main_nav_id = wp_create_nav_menu('Main menu', array('slug' => 'main-nav'));     set_theme_mod('nav_menu_locations', array('main-nav' => $main_nav_id));          $pages = get_pages();     $count = 1;      foreach($pages as $page) {         $item = array(             'menu-item-object-id' => $page->ID,             'menu-item-object' => 'page',             'menu-item-type' => 'post_type',             'menu-item-status' => 'publish',             'menu-item-position' => $count++ // im trying to use the same approach         );         wp_update_nav_menu_item($main_nav_id, 0, $item);     }      So with this code, Im trying to use the same approach as I did before with the pages, but whatever I try, the menu items are still ordered in a weird way, I just want them to be ordered the same way as they are ordered on the Pages screen. How could I fix this?


title: $_html is empty when var dumped

text:
So I have run across a bizzar issue, in which I know is working as i expect it to in terms of the array values, yet the _html variable returns something like string(29) " " which to my knowledge means 29 spaces, since spaces count as characters (feel free to correct me). Any ways, the class:               <?php          class AisisCore_Template_Helpers_Loop{              protected $_options;              protected $_wp_query;              protected $_html = '';              public function __construct($options = array()){             global $wp_query;                  if(isset($options)){                 $this->_options = $options;              }                  if(null === $this->_wp_query){                 $this->_wp_query = $wp_query;             }         }              public function init(){}              public function loop(){             if(isset($this->_options)){                 if(isset($this->_options['query'])){                     $this->_query_post($this->_options['query']);                 }elseif(isset($this->_options['type']) && $this->_options['type'] == 'single'){                     $this->_single_post();                 }else{                     $this->_general_wordpress_loop();                 }             }else{                 $this->_general_wordpress_loop();             }         }              protected function _general_wordpress_loop(){             if($this->_wp_query->have_posts()){                 while($this->_wp_query->have_posts()){                     $this->_wp_query->the_post();                     the_excerpt();                 }             }         }              protected function _query_post($query){             $empty_query = $this->_wp_query;             $wp_query = new WP_Query($query);                  if($wp_query->have_posts()){                 while($wp_query->have_posts()){                     $wp_query->the_post();                     the_excerpt();                 }             }                  next_posts_link('« Older Entries');              previous_posts_link('Newer Entries »');                  $wp_query = $empty_query;         }              protected function _single_post(){             if($this->_wp_query->have_posts()){                 while($this->_wp_query->have_posts()){                     $this->_wp_query->the_post();                          if(isset($this->_options['wrapper'])){                         $this->_html .= '
_options['wrapper']['class'])){                             $this->_html .= 'class="'.$this->_options['wrapper']['class'].'"';                         }elseif(isset($this->_options['wrapper']['id'])){                             $this->_html .= 'class="'.$this->_options['wrapper']['id'].'"';                         }                              $this->_html .= ' >';                     }                          if(isset($this->_options['title_header'])){                         $this->_html .= '<'.$this->_options['title_header'].'>';                         the_title();                         $this->_html .= '</'.$this->_options['title_header'].'>';                     }else{                         the_title();                     }                          $this->_html .= ''.the_author_meta('display_name').'';                     the_date();                     if(isset($this->_options['image'])){                         if(isset($this->_options['size']) && isset($this->_options['args'])){                             the_post_thumbnail($this->_options['image']['size'], $this->_options['image']['args']);                         }else{                             the_post_thumbnail('medium');                         }                     }                          the_content();                          if(isset($this->_options['wrapper'])){                         $this->_html .= '
';                     }                 }             }         }          }      the function to focus on is the _single_post() function. To instantiate and use this class we do the following:               $array = array(         'wrapper' => array(             'class' => 'span12'         ),         'title_header' => 'h1',         'image' => array(             'size' => 'type',             'args' => array(                 'align' => 'centered',                  'class' => 'thumbnail marginBottom20 marginTop20'             )         ),         'type' => 'single'     );          $loop = new AisisCore_Template_Helpers_Loop($array);     $loop->loop();      So as you can see we set a wrapper div, a title_header, image attributes and a type of single. The problem is, I get into each _if statement where I am like if this is a wrapper and the class key is set with a value.._ but the $this->_html returns empty. when I var_dump($this->_html); I get an empty string. One might ask "are you getting into where your doing $this->_html .= 'some content'; ? and the answer is yes I am, how ever the string seems empty. so I turn to you guys to help me see what I am doing wrong here. I have tried looking at the source to see if maybe I am crazy, but alas I am not, there is no h1 tags, wrapper tags or any thing else - yet according to the var dumps of _options, its all set and ready to go.


title: How can I set a post thumbnail image without making a featured image?

text: When I set a featured image, it is allways on the upper left corner of the post. Sometimes, like in this example post, I only have very few text and one image. But this image should not be on the upper left corner of the post. Is there any way how I can this little post thumbnail image in the tag- overview / category-overview without having it in my post? Could I tell wordpress that the image in the middle of the post is the featured image?


title: Is it possible to have one page with multiple items, or 2 blogs on a site?

text: I have a Page on my site that I use as a Blog. And then there's another page that I'd like to add a few different posts to. It's not really a blog, it's a list of projects, and each one will have about 300 words of description. I'd like users to be able to pick which project they want to view. So this could work as either a blog, or as a drop-down menu from the menu item 'other projects', or maybe in another way. -- Since I already have a blog on the site, is it possible to add another blog under another menu item? -- Or is there another way to accomplish the objective, such as making 'other projects' a drop-down menu? The current blog is here: http://richardclunan.com/blog And the page I'd like to list projects on is here: http://richardclunan.com/other-projects


title: syntax Highlighting on wordpress.com blog

text: I want to write code in my wordpress blog. which is hosted in wordpress.com. I need a Syntax Highlighter to show code. Can I configure/add Plugin in wordpress.com config panel ? or I do need a self hosted blog ?


title: What plugin will allow me to redirect 404 errors to a specific page?

text: What plugin will allow me to redirect 404 errors to a specific WP page...and track all 404 errors? I'd like to just use a plugin that will redirect without having to edit templates and such.


title: Cant get front end form to post to wordpress

text:
Long time lurker, first time poster, and big time PHP noob. Apologies if my question is a little vague, but i have the code below and I know im doing some sort of schoolboy error but it just wont send the form contents to a post. The basic out line is one form, you submit a url, then another form appears with meta data in it, then that form gets submitted to a wordpress post. Its this last bit thats not working, it just pushes you back to the first form and doesnt post the data. Any help at all would be appreciated.                   <?php     /*     Template Name: page-url     */     ?>                    <?php get_header(); ?>          <?php get_template_part('includes/breadcrumbs'); ?>

                         <?php     /* if the "submit" variable does not exist, the form has not been submitted - display initial page */     if (!isset($_POST['submit'])) {               ?>                   <form action="" method="post">         Enter your url: <input name="formuserurl">         <input type="submit" name="submit" value="Go">                   </form>               <?php         }     else {     /* if the "submit" variable exists, the form has been submitted - look for and process form data */               function file_get_contents_curl($url)     {         $ch = curl_init();                   curl_setopt($ch, CURLOPT_HEADER, 0);         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);         curl_setopt($ch, CURLOPT_URL, $url);         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);                   $data = curl_exec($ch);         curl_close($ch);                   return $data;     }               $enteredurl = $_POST['formuserurl'];     $html = file_get_contents_curl($enteredurl);               //parsing begins here:     $doc = new DOMDocument();     @$doc->loadHTML($html);     $nodes = $doc->getElementsByTagName('title');               //get and display what you need:     $title = $nodes->item(0)->nodeValue;               $metas = $doc->getElementsByTagName('meta');               for ($i = 0; $i < $metas->length; $i++)     {         $meta = $metas->item($i);         if($meta->getAttribute('name') == 'description')             $description = $meta->getAttribute('content');         if($meta->getAttribute('name') == 'keywords')             $keywords = $meta->getAttribute('content');     }               ?>               <form action="" method="post">     Url: <input name="_url2" value="<?php echo $enteredurl; ?>" id="">
     Title: <input name="_title" value="<?php echo $title; ?>" id="">
     Tags: <input name="_tags" value="<?php echo $keywords; ?>" id="">
     Description: <textarea name="_description" cols="" rows="" value="" id=""><?php echo $description; ?></textarea>
     Category: <?php wp_dropdown_categories('tab_index=10&taxonomy=category&hide_empty=0'  ); ?>
     <input type="submit" name="submitpost" value="Go">                    <?php wp_nonce_field( 'new-post' ); ?>               </form>     <?php     }     ?>                         <?php     /* This is to post the form content to wordpress*/          if (!isset($_POST['submitpost'])) {              }     else {     /* This is to post the form content to worpdress*/               if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) &&  $_POST['action'] == "new_post") {              // Do some minor form validation to make sure there is content         if (isset ($_POST['_title'])) {             $title =  $_POST['_title'];         } else {             echo 'Please enter the wine name';         }         if (isset ($_POST['_description'])) {             $description = $_POST['_description'];         } else {             echo 'Please enter some notes';         }              $tags = $_POST['_tags'];              // ADD THE FORM INPUT TO $new_post ARRAY         $new_post = array(         'post_title'    =>  $title,         'post_content'  =>  $description,         'post_category' =>  array($_POST['_categories']),  // Usable for custom taxonomies too         'tags_input'    =>  array($tags),         'post_status'   =>  'publish',           // Choose: publish, preview, future, draft, etc.         'post_type' =>  'post'  //'post',page' or use a custom post type if you want to         );              //SAVE THE POST         $pid = wp_insert_post($new_post);                       //SET OUR TAGS UP PROPERLY         wp_set_post_tags($pid, $_POST['_tags']);              //REDIRECT TO THE NEW POST ON SAVE         $link = get_permalink( $pid );         wp_redirect( $link );          } // END THE IF STATEMENT THAT STARTED THE WHOLE FORM          //POST THE POST YO     do_action('wp_insert_post', 'wp_insert_post');          }                         ?>

               <?php get_sidebar(); ?>     <?php get_footer(); ?>

          <?php get_footer(); ?>


title: jQuery | JJ Carousel Plugin - Can’t set speed

text: I am trying to use NextGen Gallery with the JJ Carousel plugin. The scrolling works now, but I can’t setup the speed of the carousel. JJ wrote: > animation: The speed of the scroll animation as string in jQuery terms > ("slow" or "fast") or milliseconds as integer (See jQuery Documentation). If > set to 0, animation is turned off. (sc: animation="setting") But anything I set in there will not work, no difference between 'fast' and '5000'. http://wordpress.org/extend/plugins/nextgen-gallery/ http://wordpress.org/extend/plugins/jj-nextgen-jquery-carousel/


title: Search form with Category and Sub Category

text: How to create WP Search Form with Category and Sub category   for illustration a search form (for search title Book=title post)   With condition By Keyword, By All Category and Sub Category selected   Where, Sub Category (CD, PDF, EPub,...)   I Look Around for a Week but unsuccessful,   Help me , Please ... => For My Client blog for CMS Ebook **I Have modified my form like This :**               <?php $media = array(      'hierarchical'       => 1,      'parent'             => get_cat_id('Media'),      'show_option_none'   => ('All Media'),      'hide_empty'   => 0  );      ?>          <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">       <div>         <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />         <?php wp_dropdown_categories('show_option_none=All Category'); ?>         <?php wp_dropdown_categories($media); ?>         <input type="submit" id="searchsubmit" value="search" />       </div>     </form>         **How to Create Function or modified form again ? Without Plugin...**   For a detailed answer I am very grateful !!!


title: Better way to show Description and image Captions

text:
I am using this code to display "Featured Image" Captions/Descriptions, also i will show my div with Captions/Descriptions only if they exist. Because my PHP skills are not best   My question is : **_Is there a better (Wordpressy way) for achieving this?_**   Thank you.               <?php     $get_desc = esc_html(get_post(get_post_thumbnail_id())->post_content);     $get_caption = esc_html(get_post(get_post_thumbnail_id())->post_excerpt);     $merge = $get_caption . '
' . $get_desc;                     the_post_thumbnail();          if(!empty( $get_caption ) && empty( $get_desc )){//If caption is not empty show the div                     echo '
' . $get_caption . '
';                                         }          else if(!empty( $get_desc ) && !empty( $get_caption )){ //If both caption and description are not empty show the div                     echo '
' . $merge . '
';                     }          else if(empty( $get_caption ) && !empty( $get_desc )){//If description is not empty show the div                     echo '
' .  $get_desc . '
';                     }                     ?>


title: Plugin for Google Apps "Short Links" service?

text: I have a Google Apps–enabled WordPress site and a subdomain where Google Short Links runs. I've been toying with the idea of shortening my own links, but I haven't been able to find a WordPress plugin that hooks into the Short Links API to automatically add new posts as they're published (and maybe old posts too). Does a plugin exist to do this? Ideally it would also add a `<link rel="shortlink">` tag to each page, but I could extend it with code from other plugins to do that. It should store the shortlink somewhere in the database, of course, so other plugins can access the link for tasks like posting to Twitter, Facebook, and so forth.


title: Listing Child Pages in a Certain Order?

text: I'm trying to show child-pages in a certain order, in a list. This is my code to output the pages as a list               $parent = $wp_query->post->ID;     wp_list_pages("title_li=&child_of=$parent&echo=1&sort_column=post_title" );      Now I want to show the first four of the pages in a particular order               -Summary     -Info     -Groups     -Entries     -Other Page     -Another Page      In other words, Summary, Info, Groups, Entries should be shown in that order (providing they exist), and other pages below. How would I achieve that? I've noticed there are parameters to include and exclude pages using wp_list_pages. These parameters take page ID numbers as variables , so I perhaps the pseudo- code is               - make a array of the IDs of child pages which include Summary, Info, Groups, Entries in their titles, and order these correctly     - make a array of the IDs of child pages which don't include the 4 pages     - join these arrays together     - print out the html of the array of page IDs


title: Print all content of a paged post

text: is it possible to print a complete post that has a number of pages? I'm working on a website that the client would like users to be able to print an article. The problem I have right now is when an article has a number of pages, by using WordPress's `<!--nextpage-->`. Say an article has the content split into 3 pages. Is there a way when printing the page to have all the content from those 3 pages displayed? Thanks in advance for any help.


title: Help me SELECT thumbnail from SQL and use

text:
//MySQL Username     $user = "myuser";     //MySQL Password     $pass = "mypass";     //MySQL Database Name     $database = "mydb";     //Number of posts you want to have appear     $numOfPosts = 7;          //Setup connection     $mysqli = new mysqli("localhost", $user, $pass, $database);     $mysqli->query("SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'");     /* check connection */     if (mysqli_connect_errno()) {     printf("Connect failed: %s\n", mysqli_connect_error());     exit();     }          $limit = $numOfPosts;     $sql = "SELECT * FROM wp_posts WHERE post_type = 'post' AND post_status IN ( 'draft', 'publish', 'future', 'pending', 'private','attachment' ) ORDER BY post_date DESC LIMIT $limit";     $result = $mysqli->query($sql);     while ($row = $result->fetch_object()) {       echo '
';         echo '
guid.'" title="'.$row->post_title.'"target="_blank">'.$row->post_title.'
';       echo '
';          }


title: Link or button to open the media manager from frontend

text: I am trying to figure out if there is a way to add a link or button that will open the media manager/library on the front end of the site? I don't need to select images for insert or to select images as featured, I simply want to allow my users to upload and edit their media within the library without having to go the backend to do so. Is this possible? I've Googled quite a bit and can't seem to find anyone else who's trying to do this so I turned here.


title: Possible to preset a widget's contents via a plugin script?

text: This plugin is a simple demo test to see if I can dynamically populate a pre- existing widget area with text. In this case, my theme has created the widget area "home-header-widget" and I'm trying to populate it with the contents of 'text' below. I'm stuck at the line...               $sidebars_widgets[$sidebar_id] = "widget_text-".$id;      In that I'm not certain how to obtain a reference to the dynamically created text widget object in order to preset its contents and place it inside my 'home-header-widget'...               <?php     /*     Plugin Name: Widget Test     */     function cb_activate_widgettest(){          $sidebar_id = 'home-header-widget';     $sidebars_widgets = get_option('sidebars_widgets');     $id = count($opts)+1;     $sidebars_widgets[$sidebar_id] = array("text-".$id);          $ops = get_option('widget_text');     // find an $id that works...     $ops[$id] = array(       'title' => 'foo hoo',       'text' => 'bar mitz', // content?     );     update_option('widget_text', $ops);      update_option('sidebars_widgets', $sidebars_widgets);          }          register_activation_hook(__FILE__, 'cb_activate_widgettest');     ?>


title: What does l10n.js do in WordPress 3.1? And how do I remove it?

text: I just installed WP 3.1 Beta 2 on my test server. I noticed that it ships with a new `l10n.js` file that gets automatically inserted into the header. I did a bit of digging and it has something to do with localization. I'm guessing that many people don't use this, so I'm wondering how I could remove it? If it's important not to remove it, please let me know as well.


title: Syndicated Posts when Updated Lose <p> HTML tags

text: When I have a syndicated post and then make an update to the syndicated copy (not original) it shows up in my blog as one long run-on paragraph. Nothing happens to the Visual or HTML data in that post, but once I click "Update" wordpress doesn't auto generate the necessary paragraph tags for the post. Is this a configuration problem or a bug with wordpress?


title: How do I remove Pages from search?

text: I don't need to search for pages in my site and only want to search posts, is there a way to do it? Thanks


title: How to Prevent WordPress from Automatically Applying Inline Styles to Post Images?

text: I am wondering how to prevent WordPress from applying in-line styles to image enclosing div's in posts.               <div class="img size-medium wp-image-3267 alignright" style="width:190px;">      **Edit:** The post is generated in the theme file by using `the_content()`. That width declaration is causing my post to display a horizontal scrollbar under the content. The weird thing is, the horizontal scroll bar only appears if the image is set to align right. Aligning the image to the left doesn't cause the scroll bars to appear. I am able to remove the scrollbar by setting the .post overflow from 'auto' to 'hidden'. Does anyone know how WordPress applyies the inline style? Or how to override it? For now, I've set .post overflow to be hidden, but I'm worried that down the line, that might bite me. Thanks


title: What's the ideal way to profile WordPress memory usage?

text: We're running a WordPress multisite instance on two Rackspace Cloud servers, one web and one database, with 30 or so sites currently. I've put Nginx in front for static assets and Apache handles all dynamic requests. I've also configured Memcached for the database and APC op code caching for PHP. W3 Total Cache is enabled by default across all of the sites we have. It's wicked fast with one issue: Apache processes regularly weigh in between 80 and 120 MB. The web server has 2 GB of memory, meaning I get 15 or so processes until things go on the fritz. The processes obviously shouldn't be that large but I'm perplexed as to why they are. What's a good strategy for identifying what's going on? Thanks in advance! **Update 10/2/10:** For those wondering, the resolution of the memory issue problem was disabling PHP xdebug (was inadvertently enabled on configuration and caused random memory usage spikes).


title: wp nav menu - highlighting current page not working properly

text: I'm trying to highlight the current page in the wp nav menu. I've read through the codex and found .current-menu-item, which I'm using in my CSS.. However it's not working. What am I missing? css               #header nav {         float: left;         padding-left: 25px;         padding-top: 12px;     }          #header nav ul li {         display: inline;     }          #header nav ul li a {         color: #333333;         font-family: amatic;         font-size: 150%;         padding-right: 25px;     }          #header nav ul li a:hover {         color: #c6e000;     }          #header nav ul li a:last-child {         padding-right: none;     }          #header nav .current-menu-item {         color: #c6e000;     }      html/php               <div id="header">          <nav>         <?php wp_nav_menu( array('menu' => 'nav' )); ?>          </nav><!-- end nav -->     </div><!-- end header -->      live site


title: Delete duplicate custom field with specific vaule

text: I'm trying to delete specific custom fields that have been duplicated, however i only want to delete the fields with the value 0 in them. I currently have this code that will delete the duplicate this will remove one duplicate field "blogger_blog", i'd like it to remove "blogger_blog=0" so that field with 0 is deleted.               delete from wp_postmeta     where meta_id in (            select *            from (                    select meta_id                    from wp_postmeta a                    where a.meta_key = 'blogger_blog'                    and meta_id not in (                            select min(meta_id)                            from wp_postmeta b                            where b.post_id = a.post_id                            and b.meta_key = 'blogger_blog'                    )            ) as x     );


title: Display posts of specific category term

text: I'm using this code to first display each category term as headlines and then display a post which is assigned each category term under the headline. If I create a custom taxonomy it works as intended, but if I attempt to use the default category taxonomy, the headlines display as intended, but under each headline, it displays every article without regard to the assigned term. I don't understand why would it work for my custom taxonomy but not for the default category taxonomy.               <?php $args = array (         'orderby'    => 'name',         'order'      => 'ASC',         'hide_empty' => true,     );          $terms = get_terms( 'category', $args );     foreach ( $terms as $term ) {         echo $term->name;              $post_args = array (             'category' => $term->name,             'posts_per_page'   => '1',             'no_found_rows' => true         );              $query = new WP_Query( $post_args );              while ( $query->have_posts() ) {             $query->the_post(); ?>                  <?php the_title(); ?>             <?php the_excerpt(); ?>              <?php }     }      If I change it to use my custom taxonomy named 'article_subjects' in this example, everything works as intended.               <?php $args = array (         'orderby'    => 'name',         'order'      => 'ASC',         'hide_empty' => true,     );          $terms = get_terms( 'article_subjects', $args );     foreach ( $terms as $term ) {         echo $term->name;              $post_args = array (             'article_subjects' => $term->name,             'posts_per_page'   => '1',             'no_found_rows' => true         );              $query = new WP_Query( $post_args );              while ( $query->have_posts() ) {             $query->the_post(); ?>                  <?php the_title(); ?>             <?php the_excerpt(); ?>              <?php }     }      And just in case it's pertinant, here is the code I used to generate the custom taxonomy.               function article_subjects() {     $labels = array(         'name'                       => _x( 'Subjects', 'Taxonomy General Name', 'dc' ),         'singular_name'              => _x( 'Subject', 'Taxonomy Singular Name', 'dc' ),         'menu_name'                  => __( 'Subjects', 'dc' ),         'all_items'                  => __( 'All Items', 'dc' ),         'parent_item'                => __( 'Parent Item', 'dc' ),         'parent_item_colon'          => __( 'Parent Item:', 'dc' ),         'new_item_name'              => __( 'New Subject', 'dc' ),         'add_new_item'               => __( 'Add New Item', 'dc' ),         'edit_item'                  => __( 'Edit Item', 'dc' ),         'update_item'                => __( 'Update Item', 'dc' ),         'separate_items_with_commas' => __( 'Separate items with commas', 'dc' ),         'search_items'               => __( 'Search Items', 'dc' ),         'add_or_remove_items'        => __( 'Add or remove items', 'dc' ),         'choose_from_most_used'      => __( 'Choose from the most used items', 'dc' ),         'not_found'                  => __( 'Not Found', 'dc' ),     );     $args = array(         'labels'                     => $labels,         'hierarchical'               => false,         'public'                     => true,         'show_ui'                    => true,         'show_admin_column'          => true,         'show_in_nav_menus'          => true,         'show_tagcloud'              => true,         'has_archive'                => true,         'can_export'                 => true          );     register_taxonomy( 'article_subjects', array( 'post' ), $args );     }     add_action( 'init', 'article_subjects', 0 );


title: Creating custom input fields on the admin side

text: I'm pretty new to wordpress (been using wordpress for a week now) and took over a site from a colleague of mine . He partially created a plugin to input "Specials" onto the site. At the moment, the fields that it shows is "Title", and "Body" with a featured image. This is what the code looks like:               public function create_specials_type()     {         register_post_type('specials',             array(                 'labels' => array(                     'name' => __('Specials'),                     'singular_name' => __('Specials')                 ),                 'public' => true,                 'has_archive' => true,                 'supports' => array(                     'title',                     'editor',                     'thumbnail',                     'revisions'                 ),                 'show_ui' => true,                 'show_in_menu' => true             )         );              add_theme_support('post-thumbnails',             array(                 'specials'             )         );     }      I want to modify this so that it shows a page (on the admin side) that looks like this: Special Name (input) Description (textarea) Items (textarea) Cost (input) Image (image) I'm using WP 3.9.2 with a custom theme. Can anyone assist me with writing this plugin or at least provide a link to a good resource that will help me do this?


title: Remove specific buttons from wp_editor()

text: I know there are similar topics with accepted answers but I can't find what I'm looking for. I want to keep only basic buttons in `wp_editor()`. I'm using this in an option page to make writing more comfortable. The problem is the theme adds a huge amount of quicktags I do not want on this specific page. How can I achieve this. So far I've looked into `wp-includes/wp-class-editor.php` but the following line does not remove unecessary buttons :               'quicktags' => array('buttons' => 'link,ins,img,close')      :/ Any help would be much appreciated. EDIT: I've tried to modify function given in similar topic with this :               function wpa_47010( $qtInit ) {     global $my_plugin_page;         $screen = get_current_screen();           if( $screen->id == $my_plugin_page )                $qtInit['buttons'] = 'link,img,close';     return $qtInit;     }     add_filter('quicktags_settings', 'wpa_47010');      But it does not work !


title: WordPress loads whole jQuery UI library

text: My wordpress loads whole jQuery UI library               <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.widget.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.position.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.mouse.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.menu.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.resizable.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.draggable.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.button.min.js?ver=1.9.2'></script>     <script type='text/javascript' src='http://example.com/wp-includes/js/jquery/ui/jquery.ui.dialog.min.js?ver=1.9.2'></script>      Is this normal? I didn't noticed the same behavior earlier.


title: Advanced Custom Fields Get value from Checkbox Within Repeater

text:
I can't figure out how in the world to get the value of a checkbox entered in a repeater field. There is only one choice. Basically if the user ticks the checkbox it should output a class. In the code example I don't have the value in the class yet because I am just trying to get it to print something! arg.               <?php if( have_rows( 'milestone_module' ) ) : ?>
              <?php                   while( have_rows( 'milestone_module' ) ) : the_row();              // Vars             $milestone_module_date = get_sub_field( 'milestone_module_date' );             $milestone_module_copy = get_sub_field( 'milestone_module_copy' );             $field = get_field_object('milestone_long_date');             $value = get_field('milestone_long_date');             $label = $field['choices'][ $value ];         ?>
             <?php if( $milestone_module_date ) : ?>                                      <?php echo $label; ?>                     <?php echo $milestone_module_date; ?>                              <?php endif; ?>                  <?php if( $milestone_module_copy ) : ?>
                     <?php echo $milestone_module_copy; ?>
             <?php endif; ?>
              <?php endwhile; wp_reset_postdata(); ?>
          <?php endif; ?>


title: How does one change the posts database table of a site?

text: I am currently in the process of developing a mobile site to accompany a site that I have been operating for a while. I came up with the idea to use multisite to create a second site with a m.domain.com prefix, but the problem is that my sites currently draw posts from different sources (the mobile site currently displays no posts due to the fact that it is pulling posts from a separate table). My question is whether it is possible to change some setting in the code to allow them to use the same database for posts and comments, and what I would need to change to do this (I can imagine it is in some PHP document somewhere in the project, but google has failed to give me anything solid). Thank you.


title: Menu is not styled properly and footer as well

text:
![enter image description here](http://i.stack.imgur.com/XNov3.png) Here I want to remove bullets that is before the menu. Here is my wordpress code for that menu :

             <?php wp_nav_menu( array( 'theme_location' => 'header' ) ); ?>

      here is my CSS:               .templatemo_menu {     list-style-type: none;     margin: 10px;     margin-top: 0px;     padding: 0px;     width: 195px;     }     .templatemo_menu li a{         background: #F4F4F4 url(images/button_default.gif) no-repeat;         font-size: 13px;         font-weight: bold;         color: #0066CC;         display: block;         width: auto;         margin-bottom: 2px;         padding: 5px;         padding-left: 12px;         text-decoration: none;       }      * html .templatemo_menu li a{            width: 190px;       }       .templatemo_menu li a:visited, .templatemo_menu li a:active{           color: #0066CC;       }       .templatemo_menu li a:hover{           background: #EEEEEE url(images/button_active.gif) no-repeat;           color: #FF3333;       }      index.php:                <?php get_header(); ?>

                 Free CSS Website Layout
                  This   free CSS  template is provided by xyz.com. Feel free to download, modify and use this layout for your websites. It would be helpful if you put a kind of credit link back to xyz.com website. Thank you.

                  Proin vel libero id erat venenatis accumsan. Nunc blandit orci sit amet risus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque dolor nulla, congue vitae, fringilla in, varius a, orci. Mauris convallis.

             <?php if ( have_posts() ) { while ( have_posts() ) { ?>

                         <a href="<?php the_permalink() ?>" rel="bookmark" title=""><?php the_title(); ?>

                         <?php the_post(); the_content();?>
Post Date: <?php the_time('F jS, Y');?> By <?php the_author_posts_link(); ?><?php _e( ' Posted in' ); ?> <?php the_category( ', ' ); ?>· Tags: CSS · Web Design · Full Story

             <?php }  } // end if ?>

                     New Flash Player

                                          Nam sit amet justo vel libero tincidunt dignissim. Fusce ac orci sit amet velit ultrices condimentum. Integer imperdiet  odio ac eros. Ut id massa. Nullam nunc. Vivamus sagittis varius lorem.                     Quisque in diam a justo condimentum molestie.

Post Date: 24-10-2020 · Tags: Flash · ActionScripts · Full Story

     <?php get_sidebar();get_footer();   ?>      Header.php:               <!DOCTYPE html>               <title><?php wp_title('|', true, 'right'); ?></title>     <link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet" type="text/css" />     <?php wp_head(); ?>

 Website Templates · Flash Templates · Company · Contact

<?php bloginfo('name'); ?>

<?php bloginfo('description'); ?>

      sidebar.php:

                 <?php wp_nav_menu( array( 'theme_location' => 'header' ) ); ?>

                 Quick Contact
                 Tel: 002-040-0240
                 Fax: 001-050-0480
                 Email: info[at]templatemo.com

                 About this website
             Curabitur velit tellus, placerat et, dapibus varius,  aliquet quis, purus. Lorem ipsum dolor sit amet, consectetuer  adipiscing elit.

             Special Thanks
             Website Link One
             Blog Link Two
             Template Link Three
             Text Link Four
             Free Templates

<?php dynamic_sidebar('Right Hand Sidebar'); ?>
      Here is my footer.php code:
         Copyright © 2048 Your Company Name · Website Templates by xyz.com
     <?php wp_footer(); ?>

           Screen shot: ![enter image description here](http://i.stack.imgur.com/uSkq4.png)


title: PHP echoes value without the use of echo

text:
I'm building a table with items in it. What I don't understand is the following: When I type `<td> <?php custom_get_terms('landschapspakket');?> </td>`, it echoes the value of `custom_get_terms('landschapspakket')`. What I want to do is use some conditional logic over it to see which value it has, and then echo it. Instead it outputs it even before I type echo. Has it got something to do with the loop? How can I avoid this?

                     Landschapspakket	                     Be nr.	                     Gebiedscode	                     Gebruiksrecht	                     Grond	                     Aantal
                      <?php $query = new WP_Query(array('post_type' => $current_posttype, 'posts_per_page' =>'-1', 'post_status' => array('publish', 'pending', 'draft', 'private'/* , 'trash' */) ) ); ?>                      <?php if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
                     <?php custom_get_terms('landschapspakket');?>	                     <?php custom_get_terms('beheerseenheidnummer');?>	                     <?php custom_get_terms('gebiedscode');?>	                     <?php custom_get_terms('gebruiksrecht');?>	                     <?php custom_get_terms('grond');?>	                     <?php custom_get_terms('stuks');?>	                          <?php $edit_post = add_query_arg('post', get_the_ID(), get_permalink(429 + $_POST['_wp_http_referer'])); ?>                                                   <a href="<?php echo $edit_post; ?>">Bewerk                              <?php if( !(get_post_status() == 'trash') ) : ?>                                  <a onclick="return confirm('Weet je zeker dat je <?php echo get_the_title() ?> wilt verwijderen?')"href="<?php echo get_delete_post_link( get_the_ID() ); ?>">Verwijder                              <?php endif; ?>
                  <?php endwhile; endif; ?>
      If the problem is in the function `custom_get_terms()`, I'll include the code:               function custom_get_terms($taxonomy) {              // Get terms for post          $terms = get_the_terms( $post->ID , $taxonomy );               // Loop over each item since it's an array          if ( $terms != null ){                 foreach( $terms as $term ) {                      // Print the name method from $term which is an OBJECT                      if ( $term->name != null ) {                          print $term->name ;                          // Get rid of the other data stored in the object, since it's not needed                      } else {                      }                   unset($term);                 }          }     }


title: WP_Query: query posts by ids from array?

text: I did quite a bit of research but can't figure why this wouldn't work for me?               echo print_r($rel); // Array ( [0] => 63 [1] => 87 )          $args = array(         'post_type' => array( 'post' ),         'orderby' => 'ASC',         'post_in' => $rel     );          $loop = new WP_Query( $args );      I don't get any posts returned? Any ideas how to only get the posts with the ids in the array?


title: Managing scheduled tasks

text: I want users of my plugin to be able to define whether a task operates daily, twice daily, hourly or not at all as per the standard WP set-up. I'm storing these as 'daily', 'twicedaily', 'hourly' or '' in the option obr_scheduled_interval. The problem is that the task that I want 'obr_grab' runs every time there's a page visit rather than every time there's a page visit after the selected time period. These are the relevant bits of code from the class.               function __construct(){         register_activation_hook(__FILE__, array(&$this, 'obr_activate_scheduled_task'));         add_action('obr_scheduled_task', array(&$this, 'obr_activate_scheduled_task'));         add_shortcode('obr_grab', array(&$this, 'obr_grab'));         register_deactivation_hook(__FILE__, array(&$this, 'obr_deactivate_scheduled_task'));     }          function obr_activate_scheduled_task() {         // function to activate the scheduled task (if there is one);         if (wp_next_scheduled('obr_scheduled_task')){             wp_clear_scheduled_hook('obr_scheduled_task');         }         $interval = get_option('obr_scheduled_interval');         if (strlen($interval) > 0){             wp_schedule_event(time(), $interval, 'obr_scheduled_task');         }     }          function obr_scheduled_task(){         // if called we need to use the grab function         $this->obr_grab();     }          function obr_deactivate_scheduled_task(){         // clear the schedule on deactivation         wp_clear_scheduled_hook('obr_scheduled_task');     }             I've looked at core control but there are only two standard jobs there: wp_scheduled_auto_draft_delete and wp_scheduled_delete All help much appreciated!


title: Is there a way for a plugin to add an attribute to the <html> tag of a theme?

text: I'm currently working on an appcache plugin for WordPress. One thing that it should do is add a manifest reference in the `<html>` tag of the site. It has to resemble something like this: `<html manifest="manifest.appcache">` Is there any way of doing this programmatically within a plugin? My current idea would be to identify the `<html` part of a theme's header file and inject the manifest using something like `str_replace()`. However, I can't see a way of filtering the output of the `get_header()` function either via the `get_header()` action or `load_template()` function. If anyone has any ideas I'd appreciate help.


title: How to add a piece of code in function

text:
On the function below, after `echo '</span>';`, I want to add this a piece of code:                <a href="<?php $key="link"; echo get_post_meta($post->ID, $key, true); ?>" target="_blank">Images Source      But I dunno how to do it, any suggestions on how to do this?               //echo '
';             echo in_array( 'date',$meta_info ) ? sprintf( '' . apply_filters('yt_icon_date_time', '') . ' %1$s',                 $time_string             ) : '';             if( in_array( 'comments',$meta_info ) ){                 echo '' . apply_filters('yt_icon_comment', '') . ' ';                     comments_popup_link( __( '0 Comments', 'theme' ), __( '1 Comment', 'theme' ), __( '% Comments', 'theme' ));                 echo '';             }                        //echo '
';


title: How to login a user with wp_set_auth_cookie on a specific blog within a multisite environment

text: How can you leverage wp_set_auth_cookie to programmatically login a user on a specific blog in a multisite environment? wp_set_auth_cookie doesn't allow you to set the target blog to authenticate the user under. I have a multisite/buddypress setup where activations happen on the primary domain. I want to then automatically authenticate that user not for the main site, but for one his site that was created on registration.


title: Exclude posts from certain category breaks custom pagination

text:
I want to show only posts from certain categories so that I exclude them in my `WP_Query()` query. Doing this my custom pagination is not working correctly. Clicking on each one of the number in the pagination itself still shows the same posts. My Custom pagination:               function glean_numeric_posts_nav() {            if( is_singular() )         return;            global $wp_query;            /** Stop execution if there's only 1 page */       if( $wp_query->max_num_pages <= 1 )         return;            $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;       $max   = intval( $wp_query->max_num_pages );            /** Add current page to the array */       if ( $paged >= 1 )         $links[] = $paged;            /** Add the pages around the current page to the array */       if ( $paged >= 3 ) {         $links[] = $paged - 1;         $links[] = $paged - 2;       }            if ( ( $paged + 2 ) <= $max ) {         $links[] = $paged + 2;         $links[] = $paged + 1;       }            echo '
' . "\n";            /** Previous Post Link */       if ( get_previous_posts_link() )         printf( '
%s
' . "\n", get_previous_posts_link('«') );            /** Link to first page, plus ellipses if necessary */       if ( ! in_array( 1, $links ) ) {         $class = 1 == $paged ? ' class="active"' : '';              printf( '
%s
' . "\n", $class, esc_url( get_pagenum_link( 1 ) ), '1' );              if ( ! in_array( 2, $links ) )           echo '
…
';       }            /** Link to current page, plus 2 pages in either direction if necessary */       sort( $links );       foreach ( (array) $links as $link ) {         $class = $paged == $link ? ' class="active"' : '';         printf( '
%s
' . "\n", $class, esc_url( get_pagenum_link( $link ) ), $link );       }            /** Link to last page, plus ellipses if necessary */       if ( ! in_array( $max, $links ) ) {         if ( ! in_array( $max - 1, $links ) )           echo '
…
' . "\n";              $class = $paged == $max ? ' class="active"' : '';         printf( '
%s
' . "\n", $class, esc_url( get_pagenum_link( $max ) ), $max );       }            /** Next Post Link */       if ( get_next_posts_link() )         printf( '
%s
' . "\n", get_next_posts_link('»') );            echo '
' . "\n";          }      And in my blog page, I filter those posts by using               $the_query = new WP_Query('cat=-10');      And then loop them. And next after the loop, I call the `glean_numeric_posts_nav()` function.


title: How to Find a Gallery's ID

text: Can you please let me know how to find out a galley's ID? and Can we use this ID in CSS styling? if not how we can stylize two different galleries in diffident style?(to be honest I am not sure this is possible or not but I hope!)


title: Divide post content in three columns

text:
Is it possible to split `the_content()` into three equal size columns? I have tried to achive that by getting this code which I found here                               <?php     $content = get_the_content();     $strings = wordwrap($content, (word_count())/3, "
"); //Put a {BREAK} every 500 characters     $chunks = explode("
", $strings); //Put each segment separated by {BREAK} into an array field          //Printing each chunk in a div     foreach($chunks as $chunk_content) {         echo "
";         echo $chunk_content;         echo "
";     }     ?>      and this is the code in my function.php               function word_count() {     $content = get_post_field( 'post_content', $post->ID );     $word_count = str_word_count( strip_tags( $content ) );     return $word_count;     }      This creates pieces but there is more than three and therefor the text is still readable horizontally across the columns...... I don't now why it shouldn't work?? Hope someone could take a look!


title: wordpress local host web login not working after port configuration

text: I installed the word press on my vm and configure my port 8000. Now, when I am trying to login into wordpress using                 http://localhost:8000/wordpress/       on browser , the link is getting changing into                 http://localhost/wordpress/       and displaying "Problem loading page : Unable to connect". I have checked xampp and I am able to access it                 http://localhost:8000/xampp


title: Build a list of partners with Link, Logo and text

text: I want to build a list of partners. At the moment, I have tried with the "links" function, the problem is that I can't use html tags on the description field. Therefore I'm looking for another solution. Anyone has a suggestion?


title: Search form as list item in menu?

text:
What is the best way to do this:               <?php wp_nav_menu( array('menu'=>'Primary',                               'container'=>'',                              'items_wrap'=>'
%3$s
'.get_search_form().'

') ); ?>


title: 500 Internal Error after Moving Wordpress

text: I've just moved my Wordpress site from localhost to a live Server. What I did that worked:   * In the live server I've created a DB+user.   * Exported (quick mode) my localhost database to .sql format   * Imported my .sql to live server's phpmyadmin in the right DB.   * Changed "site" and "home" to live server's URL from `wp_options` table.   * Uploaded all my content using FileZilla   * Changed `wp-config.php` with the new DB parameters Blank page, it gives me **500 Internal Error**. I've set `WP_DEBUG` to "true" in `wp-config.php`, but can't see no traces. Is there anything I could do to debug what happens? * * * **EDIT:** I was really close, however it took me a lot of time and I decided to try using WP Duplicator plug-in, and it worked.


title: Loop not showing up on page template

text: I have a page template and on the page I have a loop such as:               query_posts('post_type=post&posts_per_page=5&paged='.get_query_var('paged'));      if(have_posts()){         while(have_posts()){             the_post();             the_title();         }     }      The problem is that no posts are coming back when there should be about 5 or 6. Is there something wrong?


title: Which action for triggering cron "wp"or "init"?

text: Which one do you recommend using within a plugin and why?               add_action( 'wp', 'trigger_me' );     function trigger_me() {              if ( !wp_next_scheduled( 'my_plugin_cron' ) ) {             wp_schedule_event(time(), 'hourly', 'my_plugin_cron');         }          }      **OR**               add_action( 'init', 'trigger_me' );     function trigger_me() {              if ( !wp_next_scheduled( 'my_plugin_cron' ) ) {             wp_schedule_event(time(), 'hourly', 'my_plugin_cron');         }          }      What are the advantages/disadvantages of "wp" over "init" when registering/triggering cron function within a plugin?


title: How can I prevent '500 internal server error' because of a long install process?

text: In one of my plugins, I need to insert about 1000 terms into a custom taxonomy while installing a plugin. I see it's sometimes causing `500 internal server error`. How can I split that work or prevent it from giving an error?


title: Custom post type as a category, for another custom post type

text: I have custom post type called 'Porjects', and I have second custom post type called 'Clients'. Now, I want to 'Clients' be category for 'Projects'. How can I do this? Clients is custom post type not taxonomy.


title: How to load wordpress environment without loading the template?

text: Basically I want to use wordpress functions for example `wp_create_user()` or `wp_update_user()` outside of wordpress (outside of wordpress directory). I tried with all the below code snippets to load the wordpress environment, I am able to use the functions correctly in both the cases but the problem is that this also loads the wordpress template which I do not want. **First Method:**               <?php     define('WP_USE_THEMES', false);     require ('../blog/wp-load.php');     ?>      **Second Method:**               <?php     define('WP_USE_THEMES', false);     require ('../blog/wp-blog-header.php');     ?>      **Directory Structure:**               /blog       |       |_ Wordpress installed here     /admin       |       |_ admin.php (I want to use wp functions here)      Note: I am using **Writr theme** in my wordpress blog.


title: Getting Details Of Uploaded Image

text: I'm using Wordpress' upload system (as explained here) on my plugin's admin page. I can upload an image and get this image's URL. But i need attachment ID, image caption etc. How can i reach them? I have an `<form>` . It has 3 `<input>`s .               <input type="text" value="" /> //This input will be filled, after user upload an image and click to `Insert to post` button. I can do it.     <input type="button" value="Click for upload image" />     <input type="hidden" value="" name="ID" /> //Attachment ID will come here automagically (with JavaScript, maybe?). I don't know how can i get it.


title: Why might a comment turn red on approval?

text: Weird question here, but I'm hoping somebody is familiar with the issue. When an admin clicked on the "approve" link under a comment on the comment moderation screen, the entire comment row turned red. The comment did publish --but the "approve" link was still appearing in the list of actions links (when it should have changed to "unapprove"). After refreshing the comments moderation page, everything went back to normal. Not exactly an important issue. But I need to be able to explain why it happened, and I can't reproduce it (though I believe it happened--she sent me a screenshot). Any thoughts? Anybody seen this before? Is this maybe a common UI convention in WP when AJAX calls fail?


title: How to change the URL of a clickable banner?

text: As we all know, the twenty-eleven theme comes with a random banner feature which, if the site visitor clicks it, takes him to the home page. So there could be quite a few different images for the banner, but they all take you to the same URL when you click them. What I would like to have is that _each_ banner image will have its _own_ URL. How do I accomplish this?


When I try to send mail... it showing - > Fatal error: Call to undefined function get_option() in > /home/junkie/public_html/sub_demo/wp- > content/themes/scroller/includes/contact-form.php on line 9 My code=> contact-form.php               <?php     if($_POST)     {         //check if its an ajax request, exit if not         if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') {             die();         }               $to_Email       = "tanvir.focus@gmail.com"; //Replace with recipient email address         $subject        = 'Ah!! My email from Somebody out there...'; //Subject line for emails              //check $_POST vars are set, exit if any missing         if(!isset($_POST["userName"]) || !isset($_POST["userEmail"]) || !isset($_POST["userPhone"]) || !isset($_POST["userMessage"]))         {             die();         }              //Sanitize input data using PHP filter_var().         $user_Name        = filter_var($_POST["userName"], FILTER_SANITIZE_STRING);         $user_Email       = filter_var($_POST["userEmail"], FILTER_SANITIZE_EMAIL);         $user_Phone       = filter_var($_POST["userPhone"], FILTER_SANITIZE_STRING);         $user_Message     = filter_var($_POST["userMessage"], FILTER_SANITIZE_STRING);              //additional php validation         if(strlen($user_Name)<4) // If length is less than 4 it will throw an HTTP error.         {             header('HTTP/1.1 500 Name is too short or empty!');             exit();         }         if(!filter_var($user_Email, FILTER_VALIDATE_EMAIL)) //email validation         {             header('HTTP/1.1 500 Please enter a valid email!');             exit();         }         if(!is_numeric($user_Phone)) //check entered data is numbers         {             header('HTTP/1.1 500 Only numbers allowed in phone field');             exit();         }         if(strlen($user_Message)<5) //check emtpy message         {             header('HTTP/1.1 500 Too short message! Please enter something.');             exit();         }              //proceed with PHP email.         $headers = 'From: '.$user_Email.'' . "rn" .         'Reply-To: '.$user_Email.'' . "rn" .         'X-Mailer: PHP/' . phpversion();              @$sentMail = mail($to_Email, $subject, $user_Message .'  -'.$user_Name, $headers);              if(!$sentMail)         {             header('HTTP/1.1 500 Could not send mail! Sorry..');             exit();         }else{             echo 'Hi '.$user_Name .', Thank you for your email! ';             echo 'Your email has already arrived in my Inbox, all I need to do is Check it.';         }     }     ?>


title: URLs of plugin resources?

text: I am trying to add in a script and css file for my plugin into the admin header. Is there a function similar to `get_bloginfo('url')` that I could use to reference the files correctly without having to hard code url's?


title: How to disable Wp-PageNavi at the top of the page

text: By default, the Wp-PageNavi plugin creates 2 pagination links, from the second page onwards - one at the top, and another at the bottom of the page. How can I disable the pagination at the top, keeping only the pagination at the bottom?


title: On the category page, get the category object

text: Right, hopefully a nice and simple one... I'm on a category page with the id of 4, I want to get the category object back so I can interogate a few values. I've had a good old look in the WP codex with little success, remember I don't want to get the categories from a post, I want the category object from the current category. Many thanks, Ben :-)


title: What SQL Query to do a simple find and replace

text: Whenever I create a new website I first create a staging site on a subdomain like "stage.domain-name.com". After everything works correctly I export the database, open it in notepad++ and do a find/replace for "subdomain.domain-name.com" and replace it with "domain-name.com"... finally I import it into a new database for the live site. My question is... what SQL query would I need to run if I just wanted to do this simple find/replace on the entire database using phpmyadmin? -CH


title: Custom blog setting directs blog to index page

text: In WordPress, I've changed the general settings for my web site to use a static page, pointing the Front page to a custom page called 'Home' which inherits from a template page called tpl-home.php and I set the Blog to a custom page, called 'Blog' which inherits from my default blog.php page. However, when I browse to Blog, it shows up the blog posts, but within the index.php page? I've googled this, as it's a common bug that developers run into, but none of the recommended solutions work. How do I know it's the index page if it shows the blog posts? I echo 'Index' in the index.php page :D.


title: Post type no single page

text: I have created a post type and I am trying to create a single page for that post type, I am creating a php file called `single-job.php` and it is using the `index.php` as a template. Below is my function for creating the post type:               add_action( 'init', 'register_cpt_job' );     function register_cpt_job() {              $labels = array(              'name' => _x( 'Job posts', 'job' ),             'singular_name' => _x( 'Job post', 'job' ),             'add_new' => _x( 'Add New', 'job' ),             'add_new_item' => _x( 'Add New Job post', 'job' ),             'edit_item' => _x( 'Edit Job post', 'job' ),             'new_item' => _x( 'New Job post', 'job' ),             'view_item' => _x( 'View Job post', 'job' ),             'search_items' => _x( 'Search Job posts', 'job' ),             'not_found' => _x( 'No job posts found', 'job' ),             'not_found_in_trash' => _x( 'No job posts found in Trash', 'job' ),             'parent_item_colon' => _x( 'Parent Job post:', 'job' ),             'menu_name' => _x( 'Job posts', 'job' ),         );              $args = array(              'labels' => $labels,             'hierarchical' => true,                  'supports' => array( 'title', 'editor' ),             'taxonomies' => array( 'category' ),             'public' => true,             'show_ui' => true,             'show_in_menu' => true,                       'show_in_nav_menus' => true,             'publicly_queryable' => true,             'exclude_from_search' => false,             'has_archive' => true,             'query_var' => true,             'can_export' => true,             'rewrite' => true,             'capability_type' => 'post'         );              register_post_type( 'job', $args );     }


title: Variable not being returned from Ajax Javascript (though javascript receives it)

text: I'm receiving the variable to JavaScript, but not getting it back in PHP, and I think Its not being coded correctly in the JavaScript:               function glitch_player_display(mix_name) {       alert(mix_name);       throb.start();       jQuery.ajax({         type: 'POST',         url: ajaxglitch_playerajax.ajaxurl,         data: {           action: 'ajaxglitch_player_ajaxhandler',           mix_name: mix_name         },         success: function(data, textStatus, XMLHttpRequest) {           throb.stop();           var showglitchplayer = '#showglitchplayer';           jQuery(showglitchplayer).html('');           jQuery(showglitchplayer).append(data);         },         error: function(MLHttpRequest, textStatus, errorThrown) {           alert(errorThrown);         }       });     }      This is the PHP:               add_action( 'wp_ajax_nopriv_ajaxglitch_player_ajaxhandler', 'ajaxglitch_player_ajaxhandler' );     add_action( 'wp_ajax_ajaxglitch_player_ajaxhandler', 'ajaxglitch_player_ajaxhandler' );          function ajaxglitch_player_ajaxhandler($arguments){       var_dump($arguments);     }      returns empty. Thanks and have a great one.


title: WP_Query hit max joins... How else can I build a search function that uses custom fields?

text: I'm trying to search a custom post type of "Properties", while doing so I'm also searching the custom fields using multiple (anywhere from 5-30) meta_queries. The problem is Wordpress or MySQL is throwing an error saying I hit the limit of the amount of JOIN statements that can be used. The error: [The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay] Since I'm using WP_Query is it even possible to set those options? Any other ways I can get around this? Here are an example of my query $args: Here is my $args that I'm passing to WP_Query:                Array     (     [numberposts] => -1     [post_type] => properties     [status] => publish     [tax_query] => Array         (             [relation] => AND             [0] => Array                 (                     [taxonomy] => markets                     [field] => id                     [terms] => Array                         (                             [0] => 27                             [1] => 157                         )                      )              )          [meta_query] => Array         (             [relation] => AND             [0] => Array                 (                     [key] => sleeps                     [value] => 3                     [type] => NUMERIC                     [compare] => >=                 )                  [1] => Array                 (                     [key] => minimum_rate_0_rate                     [value] => Array                         (                             [0] => 999                             [1] => 2750                         )                          [type] => NUMERIC                     [compare] => BETWEEN                 )                  [2] => Array                 (                     [key] => management                     [value] => Array                         (                             [0] => Professionally Managed                             [1] => Privately Owned                         )                          [type] => CHAR                     [compare] => LIKE                 )                  [3] => Array                 (                     [key] => property_type                     [value] => Array                         (                             [0] => Home                             [1] => Condo                         )                          [type] => CHAR                     [compare] => LIKE                 )                  [4] => Array                 (                     [key] => number_of_bedrooms                     [value] => Array                         (                             [0] => 1                             [1] => 15                         )                          [type] => NUMERIC                     [compare] => BETWEEN                 )                  [5] => Array                 (                     [key] => total_number_of_baths                     [value] => Array                         (                             [0] => 1                             [1] => 10                         )                          [type] => NUMERIC                     [compare] => BETWEEN                 )                  [6] => Array                 (                     [key] => pet_policy                     [value] => cat dog                     [type] => CHAR                     [compare] => LIKE                 )                  [7] => Array                 (                     [key] => pools_hot_tubs_and_saunas                     [value] => Array                         (                             [0] => Hot Tub                         )                          [type] => CHAR                     [compare] => LIKE                 )                  [8] => Array                 (                     [key] => appliances_and_furniture                     [value] => Washer                     [type] => CHAR                     [compare] => LIKE                 )                  [9] => Array                 (                     [key] => phone_and_internet                     [value] => Internet                     [type] => CHAR                     [compare] => LIKE                 )              )      )


title: How to show related posts by category or custom post type?

text: I'm looking for the best way to go about creating, probably, custom post type where you can filter in the categories related to that custom post type in the sidebar. Here is the website I'm working on. Originally the student and donor profiles should be some type of post or category that can dynamically be updated when a new profile is created. So Health & Science, Student Success and Creative community have their own set of specific profiles. So lets say John Doe is a new student profile for Student Success I can tag him to feed through that page alone and when viewing his individual post I'm having trouble displaying the categories or profiles that are related, in this case Student Success. So when viewing John Doe's profile the other profiles under student success should be listed on the sidebar. I noticed wordpress shares the single.php template file so the sidebar I have for the single.php file is being used for the profiles which we don't want. Overall, if you run through Health & Science, Student Success and Creative community I'm looking for a set up like that but instead of a 4 step process that the client has to do when uploading a new profile I am looking for just a one step process. My current set up is you add the new profile as a page then go to the menus area in the dashboard and add the new profile to the menu. My current page template code.


title: Media is not getting uploaded on specific site using wordpress xml-rpc

text: I am using WordPress XML-RPC to create post from one WordPress site to another WordPress site. Following is my code, my code is using these two functions.                   function rtp_xml_rpc_create_post_thumbnail($attachment_id, $post_id = '') {              $myFile = get_attached_file($attachment_id);         $fh = fopen($myFile, 'rb');         $fs = filesize($myFile);         $file = fread($fh, $fs);         fclose($fh);              $data = array(             'name' => basename(get_attached_file($attachment_id)), //$attachment->post_title,             'type' => get_post_mime_type($attachment_id),             'bits' => new IXR_Base64($file), // get_attached_file( $attachment_id)             'overwrite' => true         );              if ($post_id) {             $data['post_id'] = $post_id;         }              return $this->create_attachment($data);     }                   /* Create remote attachment */          function create_attachment($data, $encoding = 'UTF-8') {              if (is_array($data)) {             $xmlrpc = $this->XMLRPCURL;             $client = new IXR_Client($xmlrpc);             $client->debug = true;             $params = $data;             ob_start();             $res = $client->query('wp.uploadFile', 0, $this->UserName, $this->PassWord, $params);             ob_end_clean();                  $status = $client->getResponse();             return $status;         }         return false;     }      When I am using same code to create post on other sites, it seems to work appropriately and post is getting created and media is also getting uploaded. But when I am trying on the actual site where I want to upload the media and create the post, problem is occurring. Post is getting created but media is not uploading. When I see on target site, I noticed that featured image has been assigned to post but image seems to be broken. I think there should be some issue on target site, please let me know if anyone has idea of what the actual problem is. Thank in advance for any help.


title: How to update my own theme?

text: I've created my own theme and I updated like following.   1. Zip my local theme.   2. Upload the zip file to wordpress themes directory in server.   3. Set wordpress theme to default(twentythirteen).   4. login to server and `cd` to wordpress themes directory.   5. `rm -rf mytheme; unzip mytheme.zip`   6. Change theme to "mytheme" again. I think this is little complicated. Is there way that I can do it more easily? Especially I want to omit "change theme setting" parts ("3" and "6"). Removing and Unzip take only per second at most. I don't care if my site shows error page in that short time.


title: Woocommerce "There was a problem connecting to the payment gateway."

text: I have recently completed a server transfer and am having troubles with the eWay payments on the site. When I checkout with PayPal it's all honky-dory however when I select Credit Card (eWay) I get the following error:               Connection error:: "There was a problem connecting to the payment gateway."      I have tried a google search but I am unable to find any form of help aside from "Contact the developer" Has anybody experienced this and come up with a solution? All the settings and files are the same as the old server and the HTTPS is configured correctly.


title: Validating custom fields before post save

text: After much unsuccessful searching, I'm hoping someone here can help me out. I am using Advanced Customs Fields (I assume most people are familiar) to create a post from the front end. I want to validate a field, and make sure there is a value before I save anything to the database. I have this function, but the two meta values I'm checking always return false (possibly because the meta values haven't been saved yet?) and I can't figure out how to check them before saving the post. Any tips appreciated. Thanks.               //Create new Custom Design post from frontend     function my_pre_save_post( $post_id )     {     // check if this is to be a new post     if( $post_id != 'new' )     {         return $post_id;     }     if (get_post_meta($post_id, 'upload_image', true) || get_post_meta($post_id, 'submit_link', true)) {              // Create a new post         global $current_user;           get_currentuserinfo();                $title = $current_user->user_email.'-'.get_date();              $post = array(             'post_status'  => 'publish' ,             'post_title'  => $title,             'post_type'  => 'custom-designs' ,         );                // insert the post         $post_id = wp_insert_post( $post );               // update $_POST['return']         $_POST['return'] = add_query_arg( array('post_id' => $post_id, 'submitted' => 'true', 'custom-error' => false), $_POST['return'] );                  // return the new ID         return $post_id;     } else {         wp_redirect(add_query_arg(array('custom-error' => 'true'), $_POST['return']));          exit;     }     }      add_filter('acf/pre_save_post' , 'my_pre_save_post' );


title: Multiple posts categorized by day?

text: I would like to set up my home page so that multiple post uploads (with no limit to the number of posts which can be uploaded) can be categorized by the day. These post uploads will mostly be videos, although some may be text posts. Here's an example of what I mean. Can this be done using archives?


title: woocommerce show products by custom field on non-shop page

text: I have added some custom fields to my products in woocommerce. I would like to use those same custom fields in a function that outputs product data based on custom field info. I first need to access my product data from another page other than 'shop' as this is going to part of a customer interaction piece of the site. For example, if I wanted to output all products that have value "tweed" in custom field "fabric", how would I do that from a page that isn't the main product page. Here is a piece of the code that I've tried. But woocommerce_page_title isn't outputting.               <?php $key_1 = get_post_meta($post->ID, 'fabric', true);            if($key_1 == 'tweed') {          echo 'check out the following products:';          echo do_shortcode('[woocommerce_page_title]');       } else {}      ?>


title: How can I Direct custom post type to template

text: For example: I have a custom post type named mycustom. in mycustom i have taxsonomy called "type". I want all the types, belonging to mycustom, will appear in the Template category-mycustom. Also, all the posts belong to mycustom appear in the Template single-mycustom


title: Items By Group added to custom post type

text: Ok, not real sure how to explain this. But i have an existing custom post type with some custom fields that is working fine for detailed information about an event. what i am trying to do now is to add items from a pre-existing table to a certain category for this event. like, event1 has details event one has three categories associated with it - FOOD, MUSIC, CRAFTS i have a table that holds say vendors in it (add, edit delete already working). i need to add a ajax type area to the admin side of the custom post type to be able to add any vendor to one of the categories. so if i went to the event custom post type and wanted to add McDonalds to the food category for this weekends event, i would just use a select box and add it. I could also add Ozzy Osbourne to the Music category for this event. I could also add Wendys to the FOOD category. hopefully this makes since. thanks in advance for any assistance.


title: Auto add pages to primary menu with functions.php

text: Is it possible to have new pages automatically added to the primary menu via functions.php? This particular theme will be deployed on a special version of multisite, so the checkbox which is available via admin isn't an option. I can't seem to find anything in codex or on here.


title: Automatic updates of plugins and themes outside of wordpress.org

text: I'm finding it surprisingly difficult to find any info on standardized ways of updating a "private" plugin that does not exist in the wordpress.org repositories. I've seen -- and bought -- plenty of premium plugins that often have updates available via the WordPress admin, so it's obviously possible. Is there a "WordPress" way of doing this? I feel like there should be an API to handle this, and would expect at least some tutorials on how to do this, but I'm having trouble finding something useful. I'm very much interested to bake this functionality into a plugin that I'm developing. I'm not interested in third-party plugins that do this for me, because I don't want the dependency. What are the current options for non-dot-org plugins and themes to be updated via admin?


title: Why doesn't my WordPress page show the most recent post?

text:
I was wondering if someone could help me with the following. My news page on my WordPress website doesn't show the most recent blog post, which I want it to do. The code I have is:
                          <?php                     $i = 1;                     if(have_posts() ) : while(have_posts() ) : the_post();                         $thumb = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );                     ?>                     <article <?php post_class(); ?>>

                                 <?php                                  if(has_post_thumbnail() ) {                                      if($i <= 0) {                                         $extra = 'big';                                         $width = 800;                                         $height = 300;                                     }                                     else {                                         $extra = 'small';                                         $width = 500;                                         $height = 400;                                     }                                     ?>                                     <figure class='<?php echo $extra;?>-figure'>                                         <a href="<?php the_permalink();?>">                                             <img src="<?php echo aq_resize($thumb, $width, $height, true); ?>" alt="<?php the_title();?>" />
                                 <?php } ?>                                 <div class='text <?php echo $extra;?>-figure'>
                                         <a href="<?php the_permalink();?>"><?php the_title();?>
                                                                              <?php                                          _e('posted by', 'Teo'); echo ' ';                                          the_author_posts_link(); echo ' ';                                         ?>
                                         <?php global $more; $more = 0; the_content('');?>

                                         <a href="<?php the_permalink();?>" class='btn btn-primary btn-large pull-right learn-more'><?php _e('Read More', 'Teo');?>

                     <?php endwhile;                      echo '
';                     get_template_part('includes/pagination');                      endif; wp_reset_query(); ?>
      If anyone can help or point me in the right direction, it would be greatly appreciated! :-)


title: filter "inactive" categories from wp_list_categories?

text: I'd like to add a checkbox to the category editor screen to allow the category to be "deactivated" (perhaps while the site owner works on the category content and posts). Once I've done this, what are my options for excluding the category's that are set to "inactive"? One way I'm thinking I can do this is to just run a filter on wp_list_categories and in the exlude= list, I'd just insert a utility function that returns all cat_ids where inactive is checked true. Are there other ways to do this?


title: go backto post screen default option

text: I have a problem with showing Post>all post button.when I click on all post its not loading showing error 503/500 internal server error.I know the problem is for long list of post (100 post in each page). I want to go back to default screen option setting (20 post) per page. I cant do it from wp admin dashboard be cause time out problem. How do I do that? Any help will be appreciated?


title: Post thats in Two Categories, only want to display name for one

text: In my Wordpress site I've created, I'm having issues hiding or not displaying one of the category titles I set up. I'll try to explain better.    **Wordpress Admin Side** I have a post that is in two categories, a "`Work`" & "`Front_Page`"    **Main Page / index.php** On my main index page, I have 3 features below the header image. One of those features is a "Featured Project". This is how I'm starting the loop...    **Single Project Page** Now on this page, the visual layout is Category Name   Which is called `<h2 class="single_category"><?=$cat[0]->name;?></h2>` Project Title   Large Header Image   Project Desription   **THE PROBLEM!!!** For whichever post I put in "`Front_Page`", it displays that in the Category Name. I want it to default to the main category. Is there a way to basically say "if post is in "`front_page`" category, don't display "`front_page`" category as name?


title: Wordpress plugin: admin-ajax.php not passing data to custom function

text: n this basic plugin skeleton, I am trying to get the data sent by ajax to wordpress admin-ajax.php to be processed by a custom function. It looks like the data send from the form does not reach my ea_ajax_handler() function. It seems to arrive to admin-ajax.php (the form data is collected by jQuery, then I get a 200 response for the post request to admin-ajax.php), but it looks like it not forwarded to ea_ajax_handler(). Here are my files: easyA.php:               /** Enqueue scripts */     add_action('wp_enqueue_scripts', 'ea_scripts');          function ea_scripts()     {         wp_enqueue_script('jquery');         // easyA script in the footer         wp_register_script('easyA', plugins_url('js/easyA.js', __FILE__), array('jquery'), '', true);         wp_enqueue_script('easyA'); // wondering if it's really needed or if the previous line is enough...         wp_localize_script('easyA', 'easyAVars', array('ajaxUrl' => admin_url('admin-ajax.php')));     }          /** Shortcode to display form in pages / posts */     add_shortcode('easyA','ea_display_form');          function ea_display_form()     {         echo '             <form id="eaForm">                 <input type="text" name="username" />                 <input type="submit" value="Submit" />             </form>             ';     }          /** Event handling */     add_action('wp_ajax_ea_ajax_handler', 'ea_ajax_handler');     add_action('wp_ajax_nopriv_ea_ajax_handler', 'ea_ajax_handler');          function ea_ajax_handler()      {         $json = array(             'success' => false,             'result'  => 0         );              if (isset($_POST['username'])) {             $result = 'Hi, ' . $_POST['username'] . '!';                  $json['success'] = true;             $json['result'] = $result;         }              echo json_encode($json);         wp_die();     }      easyA.js:               jQuery(document).ready(function($) {         $('#eaForm').on('submit', function() {             var that = $(this),                 contents = that.serialize();                  console.log('contents: ' + contents); // debugging             jQuery.ajax({                 url: easyAVars.ajaxUrl,                 dataType: 'json',                 type: 'post',                 data: contents,                 action: 'ea_ajax_handler', // function in easyA.php that will be triggered                 success: function(data) {                     console.log(data);                 }             });                  return false;         });     });


title: Categories not working - 404 Not found error

text: I have a community blog at thelazy.info . All things are working except the category. When you click on any category it gives 404 Not found error. I tried searching out myself but couldn't come up with a plausible relation. Can anybody guess how can I go with this error.               <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /index.php [L]     </IfModule>          # BEGIN WPSuperCache     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     AddDefaultCharset UTF-8     RewriteCond %{REQUEST_URI} !^.*[^/]$     RewriteCond %{REQUEST_URI} !^.*//.*$     RewriteCond %{REQUEST_METHOD} !POST     RewriteCond %{QUERY_STRING} !.*=.*     RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$     RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]     RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]     RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]     RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]     RewriteCond %{HTTP:Accept-Encoding} gzip     RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f     RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz" [L]          RewriteCond %{REQUEST_URI} !^.*[^/]$     RewriteCond %{REQUEST_URI} !^.*//.*$     RewriteCond %{REQUEST_METHOD} !POST     RewriteCond %{QUERY_STRING} !.*=.*     RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$     RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]     RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]     RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]     RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]     RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f     RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L]     </IfModule>          # END WPSuperCache          # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /index.php [L]     </IfModule>


title: 301 Redirect /author/username/ to /profile/username/

text: I have changed the `/author/` slug to `/profile/` by adding the following code in the file `functions.php`:               function new_author_base() {     global $wp_rewrite;     $author_slug = 'profile';     $wp_rewrite->author_base = $author_slug;     }     add_action('init', 'new_author_base');      Since Google is crawling my author pages now I need to redirect the old `/author/` urls to the new `/profile/` ones in the `.htaccess`... Any ideas?


title: Flickr plugin that will display photos from multiple group pools?

text: Does anyone know of a WordPress plugin that will pull in photos from multiple flickr group pools, and display random thumbnails in the sidebar? There are a ton of flickr plugins, and I just can't seem to find one that'll support multiple group pools. Something that will accept multiple rss feeds and display pictures from all of them would also be acceptable. Thanks!


title: I'm looking for some good references (manuals)

text: I started a blog recently. Currently I'm using a free theme and some plugins that are working well enough for now. And, my overall goal is to produce content and not become a WordPress developer, etc. In the meantime, I do need to upgrade my technical skills. I have one goal of customizing my current theme within 1 -3 months and potentially developing a custom theme in 6 - 8 months. I am looking for recommendations on books, ebooks, or websites to help me with the following:   * CSS - beginning to intermediate level   * PHP - beginning - I'm not interested in becoming a coder, but want to be able to tweak, troubleshoot and understand better.   * XHTML - beginning to intermediate level - 10 years ago I did HTML coding, but then moved into management. Obviously there is a huge amount of info on this via Google, etc. I'm hoping for some practical suggestions from the experts in order to avoid dead ends. thanks. -wdypdx22


title: Building useful features into your theme

text: My site has a theme which I created myself, and while it works, I often have to tweak the theme or use plugins to modify the appearance or behaviour. I've been looking at ways to modify my theme so that there's less jumping around to make changes. Ideas include some basic SEO, gallery functionality, fields for analytics and feedburner, and widgets. What features do you consider useful to build into a theme to reduce modifying it later or having to use plugins?


title: Omitted Content After Post-Publish Insertion

text:
I have a string that contains $thehtml but whenever I insert it manually into a custom post it appears that wordpress alters/strips down the html.... I've already tested/outputted $thehtml string in a separate file and its fine.. but wordpress seems to edit/strip the html I insert.... I am inserting via....               $post_information = array(     'post_content' => $thehtml,     );     wp_insert_post( $post_information );      Example of $thehtml
INFORMATION REQUIRED IN PROXY STATEMENT
      **After Insertion**.... When I look at HTML in wordpress:
INFORMATION REQUIRED IN PROXY STATEMENT


title: GPL and plugins

text: The Plugin developer center says "Your plugin must be GPLv2 Compatible.". But I found that the Topsy plugin is under GPLv3. http://www.gnu.org/licenses/rms- why-gplv3.html states that GPLv2 and GPLv3 are incompatible. So should this be allowed? I want to use some code from the Topsy plugin. Then, should I release my plugin under GPLv2 or GPLv3 ??